feat: Initialize core application structure including authentication, role-based dashboards, service task management, and integration workflows.
This commit is contained in:
37
app/Models/TaskItem.php
Normal file
37
app/Models/TaskItem.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TaskItem extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'service_task_id',
|
||||
'label',
|
||||
'is_mandatory',
|
||||
'is_completed',
|
||||
'completed_at',
|
||||
'completed_by',
|
||||
'data',
|
||||
'fields_definition',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'is_mandatory' => 'boolean',
|
||||
'is_completed' => 'boolean',
|
||||
'completed_at' => 'datetime',
|
||||
'data' => 'array',
|
||||
'fields_definition' => 'array',
|
||||
];
|
||||
|
||||
public function serviceTask()
|
||||
{
|
||||
return $this->belongsTo(ServiceTask::class);
|
||||
}
|
||||
|
||||
public function completedBy()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'completed_by');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user