mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
42 lines
731 B
PHP
42 lines
731 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SubTask extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public $timestamps = true;
|
|
public $guarded = ['id'];
|
|
|
|
public function mastertask()
|
|
{
|
|
return $this->belongsTo(MasterTask::class, 'master_task_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
public function timeblocks()
|
|
{
|
|
return $this->hasMany(Timeblock::class);
|
|
}
|
|
|
|
public function timesheets()
|
|
{
|
|
return $this->hasMany(Timesheet::class);
|
|
}
|
|
|
|
public function attachments()
|
|
{
|
|
return $this->hasMany(Attachment::class);
|
|
}
|
|
}
|
|
|
|
|