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,34 @@
// 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 TableNamePsAttributeGroup = "ps_attribute_group"
// PsAttributeGroup mapped from table <ps_attribute_group>
type PsAttributeGroup struct {
IDAttributeGroup int32 `gorm:"column:id_attribute_group;primaryKey;autoIncrement:true" json:"id_attribute_group"`
IsColorGroup bool `gorm:"column:is_color_group;not null" json:"is_color_group"`
GroupType string `gorm:"column:group_type;not null" json:"group_type"`
Position int32 `gorm:"column:position;not null" json:"position"`
}
// TableName PsAttributeGroup's table name
func (*PsAttributeGroup) TableName() string {
return TableNamePsAttributeGroup
}
var PsAttributeGroupCols = struct {
IDAttributeGroup gormcol.Field
IsColorGroup gormcol.Field
GroupType gormcol.Field
Position gormcol.Field
}{
IDAttributeGroup: gormcol.Field{Table: TableNamePsAttributeGroup, Column: "id_attribute_group"},
IsColorGroup: gormcol.Field{Table: TableNamePsAttributeGroup, Column: "is_color_group"},
GroupType: gormcol.Field{Table: TableNamePsAttributeGroup, Column: "group_type"},
Position: gormcol.Field{Table: TableNamePsAttributeGroup, Column: "position"},
}