package talent_model

// DeliveryAddress 达人收货地址信息
type DeliveryAddress struct {
	RegionCode   int    `orm:"region_code"        json:"regionCode" v:"required|integer#regionCode must be provided|regionCode must be integer"` // 区域码，取info_region表中的self_code字段值
	DetailAddr   string `orm:"detail_addr"        json:"detailAddr" v:"required|length:1,100#detailAddr must be provided|detailAddr length between :min,:max"`                                    // 详细地址
	PhoneNumber  string `orm:"phone_number"       json:"phoneNumber" v:"required|phone#phoneNumber must be provided|phoneNumber is invalid"`     // 联系电话
	ReceiverName string `orm:"receiver_name"      json:"receiverName" v:"required|length:1,20#receiverName must be provided|receiverName length between :min,:max"`                                // 收货人名字
	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"`                                    // 是否默认收货地址
	TalentId     int    `orm:"talent_id"          json:"talentId"`                                                                               // 达人id(talent_info表中的id)
}

type DeleteDeliveryAddress struct {
	AddressId  int `json:"address_id" v:"required|integer#address_id must be provided|type of address_id must be integer"`
	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"`
}

type DeliveryAddressModifyReq struct {
	AddressId    int64  `orm:"address_id"         json:"addressId" v:"required|integer#addressId must be provided|typeof addressId is integer"`
	RegionCode   int    `orm:"region_code"        json:"regionCode" v:"required|integer#regionCode must be provided|regionCode must be integer"`                                                    // 区域码，取info_region表中的self_code字段值
	DetailAddr   string `orm:"detail_addr"        json:"detailAddr" v:"required#detailAddr must be provided"`                                                                                       // 详细地址
	PhoneNumber  string `orm:"phone_number"       json:"phoneNumber" v:"required|phone#phoneNumber must be provided|phoneNumber is invalid"`                                                        // 联系电话
	ReceiverName string `orm:"receiver_name"      json:"receiverName" v:"required#receiverName must be provided"`                                                                                   // 收货人名字
	//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)
}