ctrlpanel/app/Models/Ticket.php

28 lines
537 B
PHP
Raw Normal View History

2022-08-01 16:52:16 +00:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Ticket extends Model
{
2022-08-01 16:52:16 +00:00
protected $fillable = [
'user_id', 'ticketcategory_id', 'ticket_id', 'title', 'priority', 'message', 'status', 'server',
2022-08-01 16:52:16 +00:00
];
public function ticketcategory()
{
return $this->belongsTo(TicketCategory::class);
}
2022-08-01 16:52:16 +00:00
public function ticketcomments()
{
return $this->hasMany(TicketComment::class);
}
2022-08-01 16:52:16 +00:00
public function user()
{
return $this->belongsTo(User::class);
}
}