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,40 @@
// 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"
"time"
)
const TableNamePsSmartyLazyCache = "ps_smarty_lazy_cache"
// PsSmartyLazyCache mapped from table <ps_smarty_lazy_cache>
type PsSmartyLazyCache struct {
TemplateHash string `gorm:"column:template_hash;primaryKey" json:"template_hash"`
CacheID string `gorm:"column:cache_id;primaryKey" json:"cache_id"`
CompileID string `gorm:"column:compile_id;primaryKey" json:"compile_id"`
Filepath string `gorm:"column:filepath;not null" json:"filepath"`
LastUpdate time.Time `gorm:"column:last_update;not null;default:0000-00-00 00:00:00" json:"last_update"`
}
// TableName PsSmartyLazyCache's table name
func (*PsSmartyLazyCache) TableName() string {
return TableNamePsSmartyLazyCache
}
var PsSmartyLazyCacheCols = struct {
TemplateHash gormcol.Field
CacheID gormcol.Field
CompileID gormcol.Field
Filepath gormcol.Field
LastUpdate gormcol.Field
}{
TemplateHash: gormcol.Field{Table: TableNamePsSmartyLazyCache, Column: "template_hash"},
CacheID: gormcol.Field{Table: TableNamePsSmartyLazyCache, Column: "cache_id"},
CompileID: gormcol.Field{Table: TableNamePsSmartyLazyCache, Column: "compile_id"},
Filepath: gormcol.Field{Table: TableNamePsSmartyLazyCache, Column: "filepath"},
LastUpdate: gormcol.Field{Table: TableNamePsSmartyLazyCache, Column: "last_update"},
}