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 TableNamePsQuickAccess = "ps_quick_access"
// PsQuickAccess mapped from table <ps_quick_access>
type PsQuickAccess struct {
IDQuickAccess int32 `gorm:"column:id_quick_access;primaryKey;autoIncrement:true" json:"id_quick_access"`
NewWindow bool `gorm:"column:new_window;not null" json:"new_window"`
Link string `gorm:"column:link;not null" json:"link"`
}
// TableName PsQuickAccess's table name
func (*PsQuickAccess) TableName() string {
return TableNamePsQuickAccess
}
var PsQuickAccessCols = struct {
IDQuickAccess gormcol.Field
NewWindow gormcol.Field
Link gormcol.Field
}{
IDQuickAccess: gormcol.Field{Table: TableNamePsQuickAccess, Column: "id_quick_access"},
NewWindow: gormcol.Field{Table: TableNamePsQuickAccess, Column: "new_window"},
Link: gormcol.Field{Table: TableNamePsQuickAccess, Column: "link"},
}