mirror of https://github.com/4xmen/xshop.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
461 B
PHP
22 lines
461 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Ticket extends Model
|
|
{
|
|
// use HasFactory;
|
|
public static $ticket_statuses = [['PENDING','ANSWERED','CLOSED']];
|
|
|
|
|
|
public function customer(){
|
|
return $this->belongsTo(Customer::class);
|
|
}
|
|
|
|
public function subTickets(){
|
|
return $this->hasMany(Ticket::class,'parent_id','id')->orderBy('id');
|
|
}
|
|
}
|