You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
712 B
33 lines
712 B
<?php
|
|
|
|
namespace app\admin\model\shopro\chat;
|
|
|
|
use app\admin\model\shopro\Common;
|
|
use app\admin\model\shopro\user\User as ShopUser;
|
|
|
|
|
|
class User extends Common
|
|
{
|
|
protected $name = 'shopro_chat_user';
|
|
|
|
// 自动数据类型转换
|
|
protected $type = [
|
|
'last_time' => 'timestamp',
|
|
];
|
|
|
|
public function customer()
|
|
{
|
|
return $this->morphMany(Record::class, ['sender_identify', 'sender_id'], 'customer');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(ShopUser::class, 'auth_id');
|
|
}
|
|
|
|
|
|
public function customerService()
|
|
{
|
|
return $this->belongsTo(CustomerService::class, 'customer_service_id');
|
|
}
|
|
}
|
|
|