Documentation ¶
Index ¶
Constants ¶
View Source
const TableNameOrderTable = "order_table"
View Source
const TableNameProduct = "product"
View Source
const TableNameUser = "user"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderTable ¶
type OrderTable struct { OrderID int64 `gorm:"column:order_id;type:int;primaryKey;autoIncrement:true;comment:订单ID" json:"order_id"` // 订单ID UserID int64 `gorm:"column:user_id;type:int;not null;comment:用户ID" json:"user_id"` // 用户ID ProductID int64 `gorm:"column:product_id;type:int;not null;comment:商品ID" json:"product_id"` // 商品ID OrderTime int64 `gorm:"column:order_time;type:int;not null;comment:下单时间" json:"order_time"` // 下单时间 OrderStatus int64 `gorm:"column:order_status;type:int;not null;comment:订单状态" json:"order_status"` // 订单状态 OrderAmount int64 `gorm:"column:order_amount;type:int;not null;comment:下单数量" json:"order_amount"` // 下单数量 }
OrderTable mapped from table <order_table>
func (*OrderTable) TableName ¶
func (*OrderTable) TableName() string
TableName OrderTable's table name
type Product ¶
type Product struct { ProductID int64 `gorm:"column:product_id;type:int;primaryKey;autoIncrement:true;comment:商品ID" json:"product_id"` // 商品ID ProductName string `gorm:"column:product_name;type:varchar(100);not null;comment:商品名称" json:"product_name"` // 商品名称 StockQuantity int64 `gorm:"column:stock_quantity;type:int;not null;comment:库存量" json:"stock_quantity"` // 库存量 Version int64 `gorm:"column:version;type:int;not null;comment:版本号" json:"version"` // 版本号 }
Product mapped from table <product>
type User ¶
type User struct { UserID int64 `gorm:"column:user_id;type:int;primaryKey;autoIncrement:true;comment:用户ID" json:"user_id"` // 用户ID UserName string `gorm:"column:user_name;type:varchar(50);not null;comment:用户名" json:"user_name"` // 用户名 Password string `gorm:"column:password;type:varchar(100);not null;comment:密码" json:"password"` // 密码 Email string `gorm:"column:email;type:varchar(100);not null;comment:邮箱" json:"email"` // 邮箱 }
User mapped from table <user>
Click to show internal directories.
Click to hide internal directories.