fusenapi/model/gmodel/fs_address_gen.go

35 lines
1.7 KiB
Go
Raw Normal View History

2023-06-19 01:53:35 +00:00
package gmodel
2023-06-16 11:04:13 +00:00
2023-06-16 11:29:48 +00:00
import (
2023-09-25 03:16:55 +00:00
"time"
2023-09-27 07:47:40 +00:00
"gorm.io/gorm"
2023-06-16 11:29:48 +00:00
)
2023-06-16 11:04:13 +00:00
2023-06-16 11:29:48 +00:00
// fs_address 用户地址表
2023-06-16 11:04:13 +00:00
type FsAddress struct {
2023-09-27 03:30:17 +00:00
AddressId int64 `gorm:"primary_key;default:0;auto_increment;" json:"address_id"` //
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
FirstName *string `gorm:"default:'';" json:"first_name"` // FirstName
LastName *string `gorm:"default:'';" json:"last_name"` // LastName
Mobile *string `gorm:"default:'';" json:"mobile"` // 手机号码
Street *string `gorm:"default:'';" json:"street"` // 街道
Suite *string `gorm:"default:'';" json:"suite"` // 房号
City *string `gorm:"default:'';" json:"city"` // 城市
State *string `gorm:"default:'';" json:"state"` //
Country *string `gorm:"default:'';" json:"country"` //
ZipCode *string `gorm:"default:'';" json:"zip_code"` //
Status *int64 `gorm:"default:0;" json:"status"` // 1正常 0异常
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` // 创建时间
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` // 更新时间
Ltime *time.Time `gorm:"index;default:'0000-00-00 00:00:00';" json:"ltime"` // 上次被使用的时间
2023-06-16 11:04:13 +00:00
}
type FsAddressModel struct {
db *gorm.DB
name string
}
2023-06-16 11:04:13 +00:00
func NewFsAddressModel(db *gorm.DB) *FsAddressModel {
return &FsAddressModel{db: db, name: "fs_address"}
}