forked from admin/services_core
ticker work proses
This commit is contained in:
@@ -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'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user