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 TableNamePsConditionAdvice = "ps_condition_advice"
// PsConditionAdvice mapped from table <ps_condition_advice>
type PsConditionAdvice struct {
IDCondition int32 `gorm:"column:id_condition;primaryKey" json:"id_condition"`
IDAdvice int32 `gorm:"column:id_advice;primaryKey" json:"id_advice"`
Display bool `gorm:"column:display;not null" json:"display"`
}
// TableName PsConditionAdvice's table name
func (*PsConditionAdvice) TableName() string {
return TableNamePsConditionAdvice
}
var PsConditionAdviceCols = struct {
IDCondition gormcol.Field
IDAdvice gormcol.Field
Display gormcol.Field
}{
IDCondition: gormcol.Field{Table: TableNamePsConditionAdvice, Column: "id_condition"},
IDAdvice: gormcol.Field{Table: TableNamePsConditionAdvice, Column: "id_advice"},
Display: gormcol.Field{Table: TableNamePsConditionAdvice, Column: "display"},
}