Use table name constant in Cols for type safety
This commit is contained in:
28
app/model/dbmodel/ps_web_browser.go
Normal file
28
app/model/dbmodel/ps_web_browser.go
Normal file
@@ -0,0 +1,28 @@
|
||||
// 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 TableNamePsWebBrowser = "ps_web_browser"
|
||||
|
||||
// PsWebBrowser mapped from table <ps_web_browser>
|
||||
type PsWebBrowser struct {
|
||||
IDWebBrowser int32 `gorm:"column:id_web_browser;primaryKey;autoIncrement:true" json:"id_web_browser"`
|
||||
Name *string `gorm:"column:name" json:"name"`
|
||||
}
|
||||
|
||||
// TableName PsWebBrowser's table name
|
||||
func (*PsWebBrowser) TableName() string {
|
||||
return TableNamePsWebBrowser
|
||||
}
|
||||
|
||||
var PsWebBrowserCols = struct {
|
||||
IDWebBrowser gormcol.Field
|
||||
Name gormcol.Field
|
||||
}{
|
||||
IDWebBrowser: gormcol.Field{Table: TableNamePsWebBrowser, Column: "id_web_browser"},
|
||||
Name: gormcol.Field{Table: TableNamePsWebBrowser, Column: "name"},
|
||||
}
|
||||
Reference in New Issue
Block a user