100], [['openid', 'wx_openid'], 'string', 'max' => 120], [['phone'], 'string', 'max' => 11], [['nickname'], 'string', 'max' => 21], [['headimgurl', 'country', 'province', 'city'], 'string', 'max' => 255], [['openid'], 'unique'], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'uid' => 'Uid', 'user_name' => 'User Name', 'openid' => 'Openid', 'phone' => 'Phone', 'nickname' => 'Nickname', 'headimgurl' => 'Headimgurl', 'sex' => 'Sex', 'country' => 'Country', 'province' => 'Province', 'city' => 'City', 'status' => 'Status', 'reg_time' => 'Reg Time', 'delete_flag' => 'Delete Flag', 'wx_openid' => 'Wx Openid', 'main_user_id' => 'Main User ID', ]; } /** * Des:修改用户数据 * Name: updateById * @param $value * @param $id * @return int * @author 倪宗锋 */ public function updateById($value, $id) { $count = self::updateAll($value, ['in', 'uid', $id]); return $count; } }