feat: full dashboard-ticketing scaffold with data model, controllers, Vue pages
This commit is contained in:
24
src/Models/PriorityLevel.php
Normal file
24
src/Models/PriorityLevel.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Dashboard\Ticketing\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class PriorityLevel extends Model
|
||||
{
|
||||
protected $table = 'ticketing_priority_levels';
|
||||
|
||||
protected $fillable = ['group_id', 'name', 'color', 'description', 'sort_order'];
|
||||
|
||||
public function group(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(TicketingGroup::class, 'group_id');
|
||||
}
|
||||
|
||||
public function tickets(): HasMany
|
||||
{
|
||||
return $this->hasMany(Ticket::class, 'priority_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user