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,37 @@
// 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 TableNamePsCm = "ps_cms"
// PsCm mapped from table <ps_cms>
type PsCm struct {
IDCms int32 `gorm:"column:id_cms;primaryKey;autoIncrement:true" json:"id_cms"`
IDCmsCategory int32 `gorm:"column:id_cms_category;not null" json:"id_cms_category"`
Position int32 `gorm:"column:position;not null" json:"position"`
Active bool `gorm:"column:active;not null" json:"active"`
Indexation bool `gorm:"column:indexation;not null;default:1" json:"indexation"`
}
// TableName PsCm's table name
func (*PsCm) TableName() string {
return TableNamePsCm
}
var PsCmCols = struct {
IDCms gormcol.Field
IDCmsCategory gormcol.Field
Position gormcol.Field
Active gormcol.Field
Indexation gormcol.Field
}{
IDCms: gormcol.Field{Table: TableNamePsCm, Column: "id_cms"},
IDCmsCategory: gormcol.Field{Table: TableNamePsCm, Column: "id_cms_category"},
Position: gormcol.Field{Table: TableNamePsCm, Column: "position"},
Active: gormcol.Field{Table: TableNamePsCm, Column: "active"},
Indexation: gormcol.Field{Table: TableNamePsCm, Column: "indexation"},
}