delivery_address.go 2.9 KB

12345678910111213141516171819202122232425
  1. package talent_model
  2. // DeliveryAddress 达人收货地址信息
  3. type DeliveryAddress struct {
  4. RegionCode int `orm:"region_code" json:"regionCode" v:"required|integer#regionCode must be provided|regionCode must be integer"` // 区域码,取info_region表中的self_code字段值
  5. DetailAddr string `orm:"detail_addr" json:"detailAddr" v:"required|length:1,100#detailAddr must be provided|detailAddr length between :min,:max"` // 详细地址
  6. PhoneNumber string `orm:"phone_number" json:"phoneNumber" v:"required|phone#phoneNumber must be provided|phoneNumber is invalid"` // 联系电话
  7. ReceiverName string `orm:"receiver_name" json:"receiverName" v:"required|length:1,20#receiverName must be provided|receiverName length between :min,:max"` // 收货人名字
  8. DefaultTag int `orm:"default_tag" json:"defaultTag" v:"required|integer|between:0,1#defaultTag must be provided|type of defaultTag must be int|defaultTag must between :min, :max"` // 是否默认收货地址
  9. TalentId int `orm:"talent_id" json:"talentId"` // 达人id(talent_info表中的id)
  10. }
  11. type DeleteDeliveryAddress struct {
  12. AddressId int `json:"address_id" v:"required|integer#address_id must be provided|type of address_id must be integer"`
  13. DefaultTag int `json:"default_tag" v:"required|integer|between:0,1#default_tag must be provided|type of default_tag must be integer|defaultTag must between :min, :max"`
  14. }
  15. type DeliveryAddressModifyReq struct {
  16. AddressId int64 `orm:"address_id" json:"addressId" v:"required|integer#addressId must be provided|typeof addressId is integer"`
  17. RegionCode int `orm:"region_code" json:"regionCode" v:"required|integer#regionCode must be provided|regionCode must be integer"` // 区域码,取info_region表中的self_code字段值
  18. DetailAddr string `orm:"detail_addr" json:"detailAddr" v:"required#detailAddr must be provided"` // 详细地址
  19. PhoneNumber string `orm:"phone_number" json:"phoneNumber" v:"required|phone#phoneNumber must be provided|phoneNumber is invalid"` // 联系电话
  20. ReceiverName string `orm:"receiver_name" json:"receiverName" v:"required#receiverName must be provided"` // 收货人名字
  21. //DefaultTag int `orm:"default_tag" json:"defaultTag" v:"required|integer|between:0,1#defaultTag must be provided|type of defaultTag must be int|defaultTag must between :min, :max"` // 是否默认收货地址 // 达人id(talent_info表中的id)
  22. }