fusenapi/model/gmodel/fs_address_gen.go
laodaming b91c8d75f0 fix
2023-08-23 15:08:45 +08:00

32 lines
1.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package gmodel
import (
"gorm.io/gorm"
)
// fs_address 用户地址表
type FsAddress struct {
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
Name *string `gorm:"default:'';" json:"name"` // 地址名称
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异常
IsDefault *int64 `gorm:"index;default:0;" json:"is_default"` // 1默认地址0非默认地址
}
type FsAddressModel struct {
db *gorm.DB
name string
}
func NewFsAddressModel(db *gorm.DB) *FsAddressModel {
return &FsAddressModel{db: db, name: "fs_address"}
}