address.go 796 B

1234567891011121314151617181920212223242526272829303132333435
  1. package model
  2. import model2 "cold-delivery/common/model"
  3. var (
  4. AddressTypeSender = "sender"
  5. AddressTypeConsignee = "consignee"
  6. )
  7. type Address struct {
  8. model2.Model
  9. Name string `json:"name" gorm:"size:32;"` // 收货人名称
  10. Phone string `json:"phone" gorm:"size:32;"` // 联系电话
  11. Address string `json:"address" gorm:"size:128"` // 详细地址
  12. IsDefault bool `json:"isDefault" gorm:"-"` // 默认
  13. AddressType string `json:"addressType" gorm:"size:255;" ` // 地址类型:sender-发货人 consignee-收货人
  14. model2.ControlBy
  15. model2.ModelTime
  16. model2.DeptBy
  17. }
  18. func (Address) TableName() string {
  19. return "address"
  20. }
  21. func (e *Address) Generate() model2.ActiveRecord {
  22. o := *e
  23. return &o
  24. }
  25. func (e *Address) GetId() interface{} {
  26. return e.Id
  27. }