64], [['openid', 'nickname', 'subscribe_scene'], 'string', 'max' => 50], [['head_portrait'], 'string', 'max' => 255], [['last_longitude', 'last_latitude'], 'string', 'max' => 10], [['last_address'], 'string', 'max' => 100], [['remark'], 'string', 'max' => 30], [['qr_scene'], 'safe'], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'merchant_id' => '商户ID', 'store_id' => '店铺ID', 'member_id' => '用户id', 'unionid' => '唯一公众号ID', 'openid' => 'openId', 'nickname' => '昵称', 'head_portrait' => '头像', 'follow' => '关注状态', // [1:关注;0:取消关注] 'follow_time' => '关注时间', 'unfollow_time' => '取消关注时间', 'group_id' => '分组id', 'tag' => '标签', 'last_longitude' => '最近经纬度上报', 'last_latitude' => '最近经纬度上报', 'last_address' => '最近经纬度上报地址', 'last_updated' => '最后更新时间', 'remark' => '粉丝备注', 'subscribe_scene' => '关注来源', 'qr_scene' => '二维码扫码场景', 'qr_scene_str' => '二维码扫码场景描述', 'status' => '状态[-1:删除;0:禁用;1启用]', 'created_at' => '添加时间', 'updated_at' => '修改时间', ]; } /** * 关联会员 */ public function getMember() { return $this->hasOne(Member::class, ['id' => 'member_id']); } /** * 关联授权 */ public function getAuth() { return $this->hasOne(Auth::class, ['oauth_client_user_id' => 'openid']); } /** * 标签关联 * * @return \yii\db\ActiveQuery */ public function getTags() { return $this->hasMany(FansTagMap::class, ['fans_id' => 'id']); } }