47 lines
1011 B
PHP
47 lines
1011 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Database\Factories\TicketFactory;
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
#[Fillable([
|
|
'acceptance_criteria',
|
|
'board_column_id',
|
|
'description',
|
|
'project_id',
|
|
'sequence_number',
|
|
'ticket_key',
|
|
'ticket_priority_id',
|
|
'ticket_type_id',
|
|
'title',
|
|
])]
|
|
class Ticket extends Model
|
|
{
|
|
/** @use HasFactory<TicketFactory> */
|
|
use HasFactory;
|
|
|
|
public function boardColumn(): BelongsTo
|
|
{
|
|
return $this->belongsTo(BoardColumn::class);
|
|
}
|
|
|
|
public function project(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Project::class);
|
|
}
|
|
|
|
public function ticketPriority(): BelongsTo
|
|
{
|
|
return $this->belongsTo(TicketPriority::class);
|
|
}
|
|
|
|
public function ticketType(): BelongsTo
|
|
{
|
|
return $this->belongsTo(TicketType::class);
|
|
}
|
|
}
|