package requests type UserRequest struct { PutUser // 修改用户数据-基本信息 PutBindUserName // 绑定用户数据-昵称 GetUserCheck // 检测用户数据绑定状态 } // PutUser 修改用户数据-基本信息 type PutUser struct { UserName string `json:"user_name" form:"user_name" label:"用户名称" validate:"required"` Birthday string `json:"birthday" form:"birthday" label:"出生日期" validate:"required"` Sex int `json:"sex" form:"sex" label:"性别" validate:"required,oneof=1 2"` Avatar string `json:"avatar" form:"avatar" label:"头像"` Height *int `json:"height" form:"height" label:"身高(cm)"` Weight *int `json:"weight" form:"weight" label:"体重(kg)"` NationId string `json:"nation_id" form:"nation_id" label:"民族id"` // 从int64转换为可选字符串 IsFamilyHistory *int `json:"is_family_history" form:"is_family_history" label:"是否存在家族病史" validate:"omitempty,oneof=0 1 2"` // 是否存在家族病史(0:未知 1:是 2:否) IsPregnant *int `json:"is_pregnant" form:"is_pregnant" label:"是否怀孕" validate:"omitempty,oneof=1 2 3 4"` ExpectedDate string `json:"expected_date" form:"expected_date" label:"预产期"` // 假设转换为可选字符串 ProvinceId string `json:"province_id" form:"province_id" label:"省份id" validate:"required"` // 从int转换为可选字符串 CityId string `json:"city_id" form:"city_id" label:"城市id" validate:"required"` // 从int转换为可选字符串 CountyId string `json:"county_id" form:"county_id" label:"区县id" validate:"required"` // 从int转换为可选字符串 } // PutBindUserName 绑定用户数据-昵称 type PutBindUserName struct { Nickname string `json:"nickname" form:"nickname" label:"用户昵称"` } // GetUserCheck 检测用户数据绑定状态 type GetUserCheck struct { OpenId string `json:"openid" form:"openid" label:"openid" validate:"required"` }