This commit is contained in:
2026-01-18 17:42:46 +08:00
parent 836bdc9409
commit f038dbab41
42 changed files with 3068 additions and 575 deletions

View File

@@ -23,7 +23,7 @@ class Member extends Authenticatable implements JWTSubject {
protected $fillable = ['username', 'nickname', 'email', 'mobile', 'password', 'status'];
protected $hidden = ['password', 'deleted_at'];
protected $dateFormat = 'Y-m-d H:i:s';
protected $with = ['invite:uid,nickname,username,level_id', 'extend', 'level', 'store', 'social', 'pm'];
protected $with = ['invite:uid,nickname,username,level_id', 'extend', 'level'];
/**
* Get the identifier that will be stored in the subject claim of the JWT.
@@ -75,23 +75,7 @@ class Member extends Authenticatable implements JWTSubject {
return $this->hasOne(MemberExtends::class, 'member_id', 'uid');
}
public function social(){
return $this->hasMany(\Modules\Wechat\Models\MemberSocial::class, 'member_id', 'uid');
}
public function level(){
return $this->hasOne(MemberLevel::class, 'id', 'level_id');
}
public function address(){
return $this->hasMany(MemberAddress::class, 'member_id', 'id');
}
public function pm(){
return $this->hasOne(Pm::class, 'member_id', 'pm_uid');
}
public function store(){
return $this->hasOne(Store::class, 'member_id', 'store_uid');
}
}