Use table name constant in Cols for type safety
This commit is contained in:
31
app/model/dbmodel/ps_search_engine.go
Normal file
31
app/model/dbmodel/ps_search_engine.go
Normal 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 TableNamePsSearchEngine = "ps_search_engine"
|
||||
|
||||
// PsSearchEngine mapped from table <ps_search_engine>
|
||||
type PsSearchEngine struct {
|
||||
IDSearchEngine int32 `gorm:"column:id_search_engine;primaryKey;autoIncrement:true" json:"id_search_engine"`
|
||||
Server string `gorm:"column:server;not null" json:"server"`
|
||||
Getvar string `gorm:"column:getvar;not null" json:"getvar"`
|
||||
}
|
||||
|
||||
// TableName PsSearchEngine's table name
|
||||
func (*PsSearchEngine) TableName() string {
|
||||
return TableNamePsSearchEngine
|
||||
}
|
||||
|
||||
var PsSearchEngineCols = struct {
|
||||
IDSearchEngine gormcol.Field
|
||||
Server gormcol.Field
|
||||
Getvar gormcol.Field
|
||||
}{
|
||||
IDSearchEngine: gormcol.Field{Table: TableNamePsSearchEngine, Column: "id_search_engine"},
|
||||
Server: gormcol.Field{Table: TableNamePsSearchEngine, Column: "server"},
|
||||
Getvar: gormcol.Field{Table: TableNamePsSearchEngine, Column: "getvar"},
|
||||
}
|
||||
Reference in New Issue
Block a user