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,34 @@
// 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 TableNamePsLinkBlock = "ps_link_block"
// PsLinkBlock mapped from table <ps_link_block>
type PsLinkBlock struct {
IDLinkBlock int32 `gorm:"column:id_link_block;primaryKey;autoIncrement:true" json:"id_link_block"`
IDHook *int32 `gorm:"column:id_hook" json:"id_hook"`
Position int32 `gorm:"column:position;not null" json:"position"`
Content *string `gorm:"column:content" json:"content"`
}
// TableName PsLinkBlock's table name
func (*PsLinkBlock) TableName() string {
return TableNamePsLinkBlock
}
var PsLinkBlockCols = struct {
IDLinkBlock gormcol.Field
IDHook gormcol.Field
Position gormcol.Field
Content gormcol.Field
}{
IDLinkBlock: gormcol.Field{Table: TableNamePsLinkBlock, Column: "id_link_block"},
IDHook: gormcol.Field{Table: TableNamePsLinkBlock, Column: "id_hook"},
Position: gormcol.Field{Table: TableNamePsLinkBlock, Column: "position"},
Content: gormcol.Field{Table: TableNamePsLinkBlock, Column: "content"},
}