|
|
@@ -38,8 +38,20 @@ class MemberModel extends BaseModel
|
|
|
public function parent()
|
|
|
{
|
|
|
return $this->hasOne(MemberModel::class, 'id','parent_id')
|
|
|
+ ->with(['account'])
|
|
|
->where(['status'=>1,'mark'=>1])
|
|
|
- ->select(['id', 'nickname', 'username', 'mobile', 'status']);
|
|
|
+ ->select(['id', 'nickname', 'username','avatar', 'mobile','company','department','position', 'status']);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邀请用户
|
|
|
+ */
|
|
|
+ public function invites()
|
|
|
+ {
|
|
|
+ return $this->hasOne(MemberModel::class, 'parent_id','id')
|
|
|
+ ->with(['account'])
|
|
|
+ ->where(['status'=>1,'mark'=>1])
|
|
|
+ ->select(['id', 'nickname','avatar', 'username','company','department','position', 'mobile', 'status']);
|
|
|
}
|
|
|
|
|
|
|