package model import model2 "cold-delivery/common/model" var ( AddressTypeSender = "sender" AddressTypeConsignee = "consignee" ) type Address struct { model2.Model Name string `json:"name" gorm:"size:32;"` // 收货人名称 Phone string `json:"phone" gorm:"size:32;"` // 联系电话 Address string `json:"address" gorm:"size:128"` // 详细地址 IsDefault bool `json:"isDefault" gorm:"-"` // 默认 AddressType string `json:"addressType" gorm:"size:255;" ` // 地址类型:sender-发货人 consignee-收货人 model2.ControlBy model2.ModelTime model2.DeptBy } func (Address) TableName() string { return "address" } func (e *Address) Generate() model2.ActiveRecord { o := *e return &o } func (e *Address) GetId() interface{} { return e.Id }