|
|
@@ -19,6 +19,7 @@ use app\common\model\BaseModel;
|
|
|
use app\common\model\asset\AssetArea;
|
|
|
use app\common\model\recharge\RechargeOrder;
|
|
|
use app\common\service\FileService;
|
|
|
+use app\common\model\User\User;
|
|
|
use think\model\concern\SoftDelete;
|
|
|
|
|
|
/**
|
|
|
@@ -34,14 +35,14 @@ class UserService extends BaseModel
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * @notes 关联文章
|
|
|
+ * @notes 关联用户
|
|
|
* @return \think\model\relation\HasMany
|
|
|
* @author 段誉
|
|
|
* @date 2022/10/19 16:59
|
|
|
*/
|
|
|
- public function article()
|
|
|
+ public function user()
|
|
|
{
|
|
|
- return $this->hasMany(Article::class, 'cid', 'id');
|
|
|
+ return $this->hasOne(User::class, 'id', 'user_id')->field('id,nickname,avatar');
|
|
|
}
|
|
|
|
|
|
/**
|