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 TableNamePsImageLang = "ps_image_lang"
// PsImageLang mapped from table <ps_image_lang>
type PsImageLang struct {
IDImage int32 `gorm:"column:id_image;primaryKey;index:id_image,priority:1" json:"id_image"`
IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"`
Legend *string `gorm:"column:legend" json:"legend"`
}
// TableName PsImageLang's table name
func (*PsImageLang) TableName() string {
return TableNamePsImageLang
}
var PsImageLangCols = struct {
IDImage gormcol.Field
IDLang gormcol.Field
Legend gormcol.Field
}{
IDImage: gormcol.Field{Table: TableNamePsImageLang, Column: "id_image"},
IDLang: gormcol.Field{Table: TableNamePsImageLang, Column: "id_lang"},
Legend: gormcol.Field{Table: TableNamePsImageLang, Column: "legend"},
}