Use table name constant in Cols for type safety
This commit is contained in:
40
app/model/dbmodel/ps_layered_price_index.go
Normal file
40
app/model/dbmodel/ps_layered_price_index.go
Normal file
@@ -0,0 +1,40 @@
|
||||
// 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 TableNamePsLayeredPriceIndex = "ps_layered_price_index"
|
||||
|
||||
// PsLayeredPriceIndex mapped from table <ps_layered_price_index>
|
||||
type PsLayeredPriceIndex struct {
|
||||
IDProduct int32 `gorm:"column:id_product;primaryKey" json:"id_product"`
|
||||
IDCurrency int32 `gorm:"column:id_currency;primaryKey;index:id_currency,priority:1" json:"id_currency"`
|
||||
IDShop int32 `gorm:"column:id_shop;primaryKey" json:"id_shop"`
|
||||
PriceMin float64 `gorm:"column:price_min;not null;index:price_min,priority:1" json:"price_min"`
|
||||
PriceMax float64 `gorm:"column:price_max;not null;index:price_max,priority:1" json:"price_max"`
|
||||
IDCountry int32 `gorm:"column:id_country;primaryKey" json:"id_country"`
|
||||
}
|
||||
|
||||
// TableName PsLayeredPriceIndex's table name
|
||||
func (*PsLayeredPriceIndex) TableName() string {
|
||||
return TableNamePsLayeredPriceIndex
|
||||
}
|
||||
|
||||
var PsLayeredPriceIndexCols = struct {
|
||||
IDProduct gormcol.Field
|
||||
IDCurrency gormcol.Field
|
||||
IDShop gormcol.Field
|
||||
PriceMin gormcol.Field
|
||||
PriceMax gormcol.Field
|
||||
IDCountry gormcol.Field
|
||||
}{
|
||||
IDProduct: gormcol.Field{Table: TableNamePsLayeredPriceIndex, Column: "id_product"},
|
||||
IDCurrency: gormcol.Field{Table: TableNamePsLayeredPriceIndex, Column: "id_currency"},
|
||||
IDShop: gormcol.Field{Table: TableNamePsLayeredPriceIndex, Column: "id_shop"},
|
||||
PriceMin: gormcol.Field{Table: TableNamePsLayeredPriceIndex, Column: "price_min"},
|
||||
PriceMax: gormcol.Field{Table: TableNamePsLayeredPriceIndex, Column: "price_max"},
|
||||
IDCountry: gormcol.Field{Table: TableNamePsLayeredPriceIndex, Column: "id_country"},
|
||||
}
|
||||
Reference in New Issue
Block a user