Use table name constant in Cols for type safety
This commit is contained in:
34
app/model/dbmodel/ps_link_block.go
Normal file
34
app/model/dbmodel/ps_link_block.go
Normal 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"},
|
||||
}
|
||||
Reference in New Issue
Block a user