'integer', 'user_id' => 'integer', 'field' => 'string', ]; /** * @var array */ protected $dates = [ 'created_at', 'updated_at', ]; /** * @return string */ public static function getTableName(): string { return with(new static())->getTable(); } /** * @return BelongsTo */ public function task(): BelongsTo { return $this->belongsTo(Task::class, 'task_id'); } /** * @return BelongsTo */ public function user(): BelongsTo { return $this->belongsTo(User::class, 'user_id'); } }