28 lines
910 B
PHP
28 lines
910 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\Helpdesk\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
final class SlaPolicy extends Model
|
|
{
|
|
protected $table = 'helpdesk_sla_policies';
|
|
|
|
protected $fillable = ['priority_id', 'category_id', 'name', 'slug', 'first_response_minutes', 'resolution_minutes', 'business_hours_only', 'is_default', 'is_active'];
|
|
|
|
protected $casts = ['priority_id' => 'integer', 'category_id' => 'integer', 'first_response_minutes' => 'integer', 'resolution_minutes' => 'integer', 'business_hours_only' => 'boolean', 'is_default' => 'boolean', 'is_active' => 'boolean'];
|
|
|
|
public function priority(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Priority::class, 'priority_id');
|
|
}
|
|
|
|
public function category(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Category::class, 'category_id');
|
|
}
|
|
}
|