17 lines
789 B
Go
17 lines
789 B
Go
package models
|
||
|
||
import "git.apinb.com/bsm-sdk/core/database"
|
||
|
||
// UserAddress 对应 user_address,保存用户地址。
|
||
type UserAddress struct {
|
||
Entity
|
||
UserAccountID uint64 `gorm:"column:user_account_id;not null;index" json:"user_account_id"`
|
||
Address string `gorm:"column:address;type:varchar(255);not null" json:"address"`
|
||
Longitude string `gorm:"column:longitude;type:varchar(32);not null;default:''" json:"longitude"`
|
||
Latitude string `gorm:"column:latitude;type:varchar(32);not null;default:''" json:"latitude"`
|
||
IsDefault bool `gorm:"column:is_default;not null;default:false" json:"is_default"`
|
||
}
|
||
|
||
func init() { database.AppendMigrate(&UserAddress{}) }
|
||
func (table *UserAddress) TableName() string { return "user_address" }
|