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,31 @@
// 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 TableNamePsAttributeLang = "ps_attribute_lang"
// PsAttributeLang mapped from table <ps_attribute_lang>
type PsAttributeLang struct {
IDAttribute int32 `gorm:"column:id_attribute;primaryKey;index:IDX_3ABE46A77A4F53DC,priority:1" json:"id_attribute"`
IDLang int32 `gorm:"column:id_lang;primaryKey;index:IDX_3ABE46A7BA299860,priority:1" json:"id_lang"`
Name string `gorm:"column:name;not null" json:"name"`
}
// TableName PsAttributeLang's table name
func (*PsAttributeLang) TableName() string {
return TableNamePsAttributeLang
}
var PsAttributeLangCols = struct {
IDAttribute gormcol.Field
IDLang gormcol.Field
Name gormcol.Field
}{
IDAttribute: gormcol.Field{Table: TableNamePsAttributeLang, Column: "id_attribute"},
IDLang: gormcol.Field{Table: TableNamePsAttributeLang, Column: "id_lang"},
Name: gormcol.Field{Table: TableNamePsAttributeLang, Column: "name"},
}