package model import ( "gorm.io/gorm" ) type FsAddress struct { Id int64 `gorm:"primary_key" json:"id"` // UserId *int64 `gorm:"-" json:"user_id"` // 用户ID Name *string `gorm:"-" json:"name"` // 地址名称 FirstName *string `gorm:"-" json:"first_name"` // FirstName LastName *string `gorm:"-" json:"last_name"` // LastName Mobile *string `gorm:"-" json:"mobile"` // 手机号码 Street *string `gorm:"-" json:"street"` // 街道 Suite *string `gorm:"-" json:"suite"` // 房号 City *string `gorm:"-" json:"city"` // 城市 State *string `gorm:"-" json:"state"` // 州名 Country *string `gorm:"-" json:"country"` // 国家 ZipCode *string `gorm:"-" json:"zip_code"` // 邮编 Status *int64 `gorm:"-" json:"status"` // 1正常 0异常 IsDefault *int64 `gorm:"-" json:"is_default"` // 1默认地址,0非默认地址 } type FsAddressModel struct{ db *gorm.DB } func NewFsAddressModel(db *gorm.DB) *FsAddressModel { return &FsAddressModel{db} }