34 lines
610 B
PHP
34 lines
610 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Ticket extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'ticket';
|
|
|
|
protected $fillable = [
|
|
'ticket_num',
|
|
'subject',
|
|
'customer_id',
|
|
'description',
|
|
'status',
|
|
'room',
|
|
'data'
|
|
];
|
|
|
|
public function customer()
|
|
{
|
|
return $this->belongsTo(\App\Models\Customer::class);
|
|
}
|
|
|
|
public function reply()
|
|
{
|
|
return $this->hasMany(\App\Models\TicketReply::class,'ticket_id','id');
|
|
}
|
|
}
|