Use table name constant in Cols for type safety

This commit is contained in:
2026-03-29 15:29:39 +02:00
parent 0cfddddccb
commit a53e24c5b8
315 changed files with 13092 additions and 5 deletions

View File

@@ -0,0 +1,43 @@
// 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 TableNamePsCustomizedDatum = "ps_customized_data"
// PsCustomizedDatum mapped from table <ps_customized_data>
type PsCustomizedDatum struct {
IDCustomization int32 `gorm:"column:id_customization;primaryKey" json:"id_customization"`
Type bool `gorm:"column:type;primaryKey" json:"type"`
Index int32 `gorm:"column:index;primaryKey" json:"index"`
Value string `gorm:"column:value;not null" json:"value"`
IDModule int32 `gorm:"column:id_module;not null" json:"id_module"`
Price float64 `gorm:"column:price;not null;default:0.000000" json:"price"`
Weight float64 `gorm:"column:weight;not null;default:0.000000" json:"weight"`
}
// TableName PsCustomizedDatum's table name
func (*PsCustomizedDatum) TableName() string {
return TableNamePsCustomizedDatum
}
var PsCustomizedDatumCols = struct {
IDCustomization gormcol.Field
Type gormcol.Field
Index gormcol.Field
Value gormcol.Field
IDModule gormcol.Field
Price gormcol.Field
Weight gormcol.Field
}{
IDCustomization: gormcol.Field{Table: TableNamePsCustomizedDatum, Column: "id_customization"},
Type: gormcol.Field{Table: TableNamePsCustomizedDatum, Column: "type"},
Index: gormcol.Field{Table: TableNamePsCustomizedDatum, Column: "index"},
Value: gormcol.Field{Table: TableNamePsCustomizedDatum, Column: "value"},
IDModule: gormcol.Field{Table: TableNamePsCustomizedDatum, Column: "id_module"},
Price: gormcol.Field{Table: TableNamePsCustomizedDatum, Column: "price"},
Weight: gormcol.Field{Table: TableNamePsCustomizedDatum, Column: "weight"},
}