Use table name constant in Cols for type safety
This commit is contained in:
43
app/model/dbmodel/ps_pagenotfound.go
Normal file
43
app/model/dbmodel/ps_pagenotfound.go
Normal file
@@ -0,0 +1,43 @@
|
||||
// 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 TableNamePsPagenotfound = "ps_pagenotfound"
|
||||
|
||||
// PsPagenotfound mapped from table <ps_pagenotfound>
|
||||
type PsPagenotfound struct {
|
||||
IDPagenotfound int32 `gorm:"column:id_pagenotfound;primaryKey;autoIncrement:true" json:"id_pagenotfound"`
|
||||
IDShop int32 `gorm:"column:id_shop;not null;default:1" json:"id_shop"`
|
||||
IDShopGroup int32 `gorm:"column:id_shop_group;not null;default:1" json:"id_shop_group"`
|
||||
RequestURI string `gorm:"column:request_uri;not null" json:"request_uri"`
|
||||
HTTPReferer string `gorm:"column:http_referer;not null" json:"http_referer"`
|
||||
DateAdd time.Time `gorm:"column:date_add;not null;index:date_add,priority:1" json:"date_add"`
|
||||
}
|
||||
|
||||
// TableName PsPagenotfound's table name
|
||||
func (*PsPagenotfound) TableName() string {
|
||||
return TableNamePsPagenotfound
|
||||
}
|
||||
|
||||
var PsPagenotfoundCols = struct {
|
||||
IDPagenotfound gormcol.Field
|
||||
IDShop gormcol.Field
|
||||
IDShopGroup gormcol.Field
|
||||
RequestURI gormcol.Field
|
||||
HTTPReferer gormcol.Field
|
||||
DateAdd gormcol.Field
|
||||
}{
|
||||
IDPagenotfound: gormcol.Field{Table: TableNamePsPagenotfound, Column: "id_pagenotfound"},
|
||||
IDShop: gormcol.Field{Table: TableNamePsPagenotfound, Column: "id_shop"},
|
||||
IDShopGroup: gormcol.Field{Table: TableNamePsPagenotfound, Column: "id_shop_group"},
|
||||
RequestURI: gormcol.Field{Table: TableNamePsPagenotfound, Column: "request_uri"},
|
||||
HTTPReferer: gormcol.Field{Table: TableNamePsPagenotfound, Column: "http_referer"},
|
||||
DateAdd: gormcol.Field{Table: TableNamePsPagenotfound, Column: "date_add"},
|
||||
}
|
||||
Reference in New Issue
Block a user