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 TableNamePsManufacturerLang = "ps_manufacturer_lang"
// PsManufacturerLang mapped from table <ps_manufacturer_lang>
type PsManufacturerLang struct {
IDManufacturer int32 `gorm:"column:id_manufacturer;primaryKey" json:"id_manufacturer"`
IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"`
Description *string `gorm:"column:description" json:"description"`
ShortDescription *string `gorm:"column:short_description" json:"short_description"`
MetaTitle *string `gorm:"column:meta_title" json:"meta_title"`
MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"`
MetaDescription *string `gorm:"column:meta_description" json:"meta_description"`
}
// TableName PsManufacturerLang's table name
func (*PsManufacturerLang) TableName() string {
return TableNamePsManufacturerLang
}
var PsManufacturerLangCols = struct {
IDManufacturer gormcol.Field
IDLang gormcol.Field
Description gormcol.Field
ShortDescription gormcol.Field
MetaTitle gormcol.Field
MetaKeywords gormcol.Field
MetaDescription gormcol.Field
}{
IDManufacturer: gormcol.Field{Table: TableNamePsManufacturerLang, Column: "id_manufacturer"},
IDLang: gormcol.Field{Table: TableNamePsManufacturerLang, Column: "id_lang"},
Description: gormcol.Field{Table: TableNamePsManufacturerLang, Column: "description"},
ShortDescription: gormcol.Field{Table: TableNamePsManufacturerLang, Column: "short_description"},
MetaTitle: gormcol.Field{Table: TableNamePsManufacturerLang, Column: "meta_title"},
MetaKeywords: gormcol.Field{Table: TableNamePsManufacturerLang, Column: "meta_keywords"},
MetaDescription: gormcol.Field{Table: TableNamePsManufacturerLang, Column: "meta_description"},
}