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 TableNamePsHookAlias = "ps_hook_alias"
// PsHookAlias mapped from table <ps_hook_alias>
type PsHookAlias struct {
IDHookAlias int32 `gorm:"column:id_hook_alias;primaryKey;autoIncrement:true" json:"id_hook_alias"`
Alias string `gorm:"column:alias;not null;uniqueIndex:alias,priority:1" json:"alias"`
Name string `gorm:"column:name;not null" json:"name"`
}
// TableName PsHookAlias's table name
func (*PsHookAlias) TableName() string {
return TableNamePsHookAlias
}
var PsHookAliasCols = struct {
IDHookAlias gormcol.Field
Alias gormcol.Field
Name gormcol.Field
}{
IDHookAlias: gormcol.Field{Table: TableNamePsHookAlias, Column: "id_hook_alias"},
Alias: gormcol.Field{Table: TableNamePsHookAlias, Column: "alias"},
Name: gormcol.Field{Table: TableNamePsHookAlias, Column: "name"},
}