ticket type rework
This commit is contained in:
@@ -8,20 +8,19 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
#[Fillable(['is_builtin', 'name', 'position', 'project_id', 'system_key'])]
|
||||
#[Fillable(['name', 'position', 'project_id', 'is_parent'])]
|
||||
class TicketType extends Model
|
||||
{
|
||||
/**
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public const BUILTIN_KEYS = [
|
||||
'task',
|
||||
'parent',
|
||||
];
|
||||
|
||||
/** @use HasFactory<TicketTypeFactory> */
|
||||
use HasFactory;
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'is_parent' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
public function project(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Project::class);
|
||||
|
||||
Reference in New Issue
Block a user