You've already forked guangan
工单
This commit is contained in:
@ -7,6 +7,7 @@ use think\admin\Model;
|
||||
|
||||
class TicketRepair extends Model
|
||||
{
|
||||
protected $append = ['imgs_arr'];
|
||||
public function ticket()
|
||||
{
|
||||
return $this->belongsTo(TicketTicket::class, 'ticket_id');
|
||||
|
@ -2,11 +2,12 @@
|
||||
|
||||
namespace plugin\ticket\model;
|
||||
|
||||
use plugin\inspection\model\InspectionStaff;
|
||||
use think\admin\Model;
|
||||
|
||||
class TicketTicket extends Model
|
||||
{
|
||||
protected $append = ['status_text', 'type_name', 'dept_name'];
|
||||
protected $append = ['status_text', 'type_name', 'dept_name', 'imgs_arr'];
|
||||
protected $globalScope = ['unConf'];
|
||||
protected $table = 'ticket_ticket';
|
||||
public function type()
|
||||
@ -105,6 +106,11 @@ class TicketTicket extends Model
|
||||
return $this->belongsTo(TicketDept::class, 'dept_id');
|
||||
}
|
||||
|
||||
public function fzUser()
|
||||
{
|
||||
return $this->belongsTo(InspectionStaff::class, 'fz_user_id');
|
||||
}
|
||||
|
||||
public function verify()
|
||||
{
|
||||
return $this->hasMany(TicketVerify::class, 'ticket_id')->order('create_at', 'desc');
|
||||
|
@ -7,6 +7,7 @@ use think\admin\Model;
|
||||
|
||||
class TicketVerify extends Model
|
||||
{
|
||||
protected $append = ['imgs_arr'];
|
||||
public function ticket()
|
||||
{
|
||||
return $this->belongsTo(TicketTicket::class, 'ticket_id');
|
||||
|
Reference in New Issue
Block a user