TicketLog.php
680 字节
<?php
namespace App\Models\WorkOrder;
use App\Models\Base;
use App\Models\Manage\Manage;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class TicketLog extends Base
{
use HasFactory;
protected $table = 'gl_ticket_logs';
const STATUS_PEDDING = 0; // 待处理
const STATUS_PROCESSING = 1; // 处理中
const STATUS_COMPLETED = 2; // 已完成
const STATUS_CLOSED = 3; // 已关闭
public function engineer()
{
return $this->belongsTo(Manage::class, 'engineer_id', 'id')
->select(['id', 'name']);
}
public function ticket()
{
return $this->belongsTo(Tickets::class, 'ticket_id', 'id');
}
}