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.
42 lines
815 B
42 lines
815 B
<?php
|
|
|
|
namespace app\common\model\user;
|
|
|
|
use cores\BaseModel;
|
|
use think\model\relation\BelongsTo;
|
|
|
|
class IdentityOrder extends BaseModel
|
|
{
|
|
// 定义表名
|
|
protected $name = 'user_identity_order';
|
|
|
|
// 定义主键
|
|
protected $pk = 'order_id';
|
|
|
|
/**
|
|
/**
|
|
* 关联会员记录表
|
|
* @return BelongsTo
|
|
*/
|
|
public function user(): BelongsTo
|
|
{
|
|
$module = self::getCalledModule();
|
|
return $this->belongsTo("app\\{$module}\\model\\User");
|
|
}
|
|
// /**
|
|
// * 关联用户表
|
|
// * @return BelongsTo
|
|
// */
|
|
// public function user(): BelongsTo
|
|
// {
|
|
// return $this->belongsTo('User')->field(['user_id', 'nick_name', 'avatar_id']);
|
|
// }
|
|
|
|
public static function detail($where)
|
|
{
|
|
return self::get($where);
|
|
}
|
|
|
|
|
|
|
|
} |