'integer', 'entity_type' => 'string', 'name' => 'string', 'value' => 'string', ]; protected $dates = [ 'created_at', 'updated_at', 'deleted_at', ]; public function entity(): MorphTo { return $this->morphTo(); } public static function getTableName(): string { return with(new static())->getTable(); } public static function loadMorphMap(): void { Relation::enforceMorphMap([ self::PROJECT_CODE => Project::class, self::TASK_CODE => Task::class, self::TIME_INTERVAL_CODE => TimeInterval::class, self::USER_CODE => User::class, self::TASK_COMMENT_CODE => TaskComment::class, ]); } }