21 lines
744 B
Go
21 lines
744 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
// UserAddress 对应表 user_addresses
|
|
type UserAddress struct {
|
|
ID string `gorm:"column:id;primaryKey;size:50"`
|
|
UserID string `gorm:"column:user_id;size:50"`
|
|
Name string `gorm:"column:name;size:50"`
|
|
Phone string `gorm:"column:phone;size:20"`
|
|
Province string `gorm:"column:province;size:50"`
|
|
City string `gorm:"column:city;size:50"`
|
|
District string `gorm:"column:district;size:50"`
|
|
Detail string `gorm:"column:detail;size:200"`
|
|
IsDefault bool `gorm:"column:is_default"`
|
|
CreatedAt time.Time `gorm:"column:created_at"`
|
|
UpdatedAt time.Time `gorm:"column:updated_at"`
|
|
}
|
|
|
|
func (UserAddress) TableName() string { return "user_addresses" }
|