1
0

ticker work proses

This commit is contained in:
Wian Drs
2026-06-22 13:34:49 +07:00
parent 844b8a0ff0
commit b52e67c428
22 changed files with 1193 additions and 16 deletions
+22
View File
@@ -15,5 +15,27 @@ class Ticket extends Model
'priority',
'status',
'created_by',
'assigned_at',
'approved_by',
'approved_at',
'rejected_by',
'rejected_at',
'rejection_reason',
'resolved_at',
'closed_at',
];
/*
|--------------------------------------------------------------------------
| Relationships
|--------------------------------------------------------------------------
*/
public function ticketType()
{
return $this->belongsTo(
TicketType::class,
'ticket_type_id'
);
}
}
+10 -1
View File
@@ -6,5 +6,14 @@ use Illuminate\Database\Eloquent\Model;
class TicketApproval extends Model
{
//
public $timestamps = false;
protected $fillable = [
'ticket_id',
'approver_id',
'status',
'notes',
'approved_at',
'created_at'
];
}
+10 -1
View File
@@ -6,5 +6,14 @@ use Illuminate\Database\Eloquent\Model;
class TicketAssignment extends Model
{
//
public $timestamps = false;
protected $fillable = [
'ticket_id',
'user_id',
'is_leader',
'assigned_by',
'assigned_at',
'status'
];
}
+23 -3
View File
@@ -12,10 +12,30 @@ class TicketType extends Model
'code',
'name',
'need_approval',
'sla_minutes'
'sla_minutes',
'require_photo',
'require_material',
'need_customer',
];
protected $casts = [
'need_approval' => 'boolean',
'need_approval' => 'boolean',
'require_photo' => 'boolean',
'require_material' => 'boolean',
'need_customer' => 'boolean',
];
}
/*
|--------------------------------------------------------------------------
| Relationships
|--------------------------------------------------------------------------
*/
public function tickets()
{
return $this->hasMany(
Ticket::class,
'ticket_type_id'
);
}
}