Use table name constant in Cols for type safety
This commit is contained in:
55
app/model/dbmodel/ps_stock.go
Normal file
55
app/model/dbmodel/ps_stock.go
Normal file
@@ -0,0 +1,55 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package dbmodel
|
||||
|
||||
import "git.ma-al.com/goc_marek/gormcol"
|
||||
|
||||
const TableNamePsStock = "ps_stock"
|
||||
|
||||
// PsStock mapped from table <ps_stock>
|
||||
type PsStock struct {
|
||||
IDStock int32 `gorm:"column:id_stock;primaryKey;autoIncrement:true" json:"id_stock"`
|
||||
IDWarehouse int32 `gorm:"column:id_warehouse;not null;index:id_warehouse,priority:1" json:"id_warehouse"`
|
||||
IDProduct int32 `gorm:"column:id_product;not null;index:id_product,priority:1" json:"id_product"`
|
||||
IDProductAttribute int32 `gorm:"column:id_product_attribute;not null;index:id_product_attribute,priority:1" json:"id_product_attribute"`
|
||||
Reference string `gorm:"column:reference;not null" json:"reference"`
|
||||
Ean13 *string `gorm:"column:ean13" json:"ean13"`
|
||||
Isbn *string `gorm:"column:isbn" json:"isbn"`
|
||||
Upc *string `gorm:"column:upc" json:"upc"`
|
||||
PhysicalQuantity int32 `gorm:"column:physical_quantity;not null" json:"physical_quantity"`
|
||||
UsableQuantity int32 `gorm:"column:usable_quantity;not null" json:"usable_quantity"`
|
||||
PriceTe *float64 `gorm:"column:price_te;default:0.000000" json:"price_te"`
|
||||
}
|
||||
|
||||
// TableName PsStock's table name
|
||||
func (*PsStock) TableName() string {
|
||||
return TableNamePsStock
|
||||
}
|
||||
|
||||
var PsStockCols = struct {
|
||||
IDStock gormcol.Field
|
||||
IDWarehouse gormcol.Field
|
||||
IDProduct gormcol.Field
|
||||
IDProductAttribute gormcol.Field
|
||||
Reference gormcol.Field
|
||||
Ean13 gormcol.Field
|
||||
Isbn gormcol.Field
|
||||
Upc gormcol.Field
|
||||
PhysicalQuantity gormcol.Field
|
||||
UsableQuantity gormcol.Field
|
||||
PriceTe gormcol.Field
|
||||
}{
|
||||
IDStock: gormcol.Field{Table: TableNamePsStock, Column: "id_stock"},
|
||||
IDWarehouse: gormcol.Field{Table: TableNamePsStock, Column: "id_warehouse"},
|
||||
IDProduct: gormcol.Field{Table: TableNamePsStock, Column: "id_product"},
|
||||
IDProductAttribute: gormcol.Field{Table: TableNamePsStock, Column: "id_product_attribute"},
|
||||
Reference: gormcol.Field{Table: TableNamePsStock, Column: "reference"},
|
||||
Ean13: gormcol.Field{Table: TableNamePsStock, Column: "ean13"},
|
||||
Isbn: gormcol.Field{Table: TableNamePsStock, Column: "isbn"},
|
||||
Upc: gormcol.Field{Table: TableNamePsStock, Column: "upc"},
|
||||
PhysicalQuantity: gormcol.Field{Table: TableNamePsStock, Column: "physical_quantity"},
|
||||
UsableQuantity: gormcol.Field{Table: TableNamePsStock, Column: "usable_quantity"},
|
||||
PriceTe: gormcol.Field{Table: TableNamePsStock, Column: "price_te"},
|
||||
}
|
||||
Reference in New Issue
Block a user