Use table name constant in Cols for type safety
This commit is contained in:
34
app/model/dbmodel/ps_inpost_point.go
Normal file
34
app/model/dbmodel/ps_inpost_point.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"
|
||||
"time"
|
||||
)
|
||||
|
||||
const TableNamePsInpostPoint = "ps_inpost_point"
|
||||
|
||||
// PsInpostPoint mapped from table <ps_inpost_point>
|
||||
type PsInpostPoint struct {
|
||||
IDPoint string `gorm:"column:id_point;primaryKey" json:"id_point"`
|
||||
Data string `gorm:"column:data;not null" json:"data"`
|
||||
DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"`
|
||||
}
|
||||
|
||||
// TableName PsInpostPoint's table name
|
||||
func (*PsInpostPoint) TableName() string {
|
||||
return TableNamePsInpostPoint
|
||||
}
|
||||
|
||||
var PsInpostPointCols = struct {
|
||||
IDPoint gormcol.Field
|
||||
Data gormcol.Field
|
||||
DateUpd gormcol.Field
|
||||
}{
|
||||
IDPoint: gormcol.Field{Table: TableNamePsInpostPoint, Column: "id_point"},
|
||||
Data: gormcol.Field{Table: TableNamePsInpostPoint, Column: "data"},
|
||||
DateUpd: gormcol.Field{Table: TableNamePsInpostPoint, Column: "date_upd"},
|
||||
}
|
||||
Reference in New Issue
Block a user