mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
28 lines
580 B
PHP
28 lines
580 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Timesheet extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public $timestamps = true;
|
|
public $guarded = ['id'];
|
|
public $fillable = ['sub_task_id', 'user_id', 'time', 'synced_to_karat', 'created_at', 'updated_at'];
|
|
|
|
protected $touches = ['subtask'];
|
|
|
|
public function subtask()
|
|
{
|
|
return $this->belongsTo(SubTask::class, 'sub_task_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|