29 lines
496 B
PHP
29 lines
496 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MobileSubtask extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'mobile_subtasks';
|
|
|
|
protected $fillable = [
|
|
'task_id',
|
|
'title',
|
|
'is_completed',
|
|
];
|
|
|
|
protected $casts = [
|
|
'is_completed' => 'boolean',
|
|
];
|
|
|
|
public function task()
|
|
{
|
|
return $this->belongsTo(MobileTask::class, 'task_id');
|
|
}
|
|
}
|