Use table name constant in Cols for type safety
This commit is contained in:
34
app/model/dbmodel/ps_import_match.go
Normal file
34
app/model/dbmodel/ps_import_match.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 TableNamePsImportMatch = "ps_import_match"
|
||||
|
||||
// PsImportMatch mapped from table <ps_import_match>
|
||||
type PsImportMatch struct {
|
||||
IDImportMatch int32 `gorm:"column:id_import_match;primaryKey;autoIncrement:true" json:"id_import_match"`
|
||||
Name string `gorm:"column:name;not null" json:"name"`
|
||||
Match string `gorm:"column:match;not null" json:"match"`
|
||||
Skip int32 `gorm:"column:skip;not null" json:"skip"`
|
||||
}
|
||||
|
||||
// TableName PsImportMatch's table name
|
||||
func (*PsImportMatch) TableName() string {
|
||||
return TableNamePsImportMatch
|
||||
}
|
||||
|
||||
var PsImportMatchCols = struct {
|
||||
IDImportMatch gormcol.Field
|
||||
Name gormcol.Field
|
||||
Match gormcol.Field
|
||||
Skip gormcol.Field
|
||||
}{
|
||||
IDImportMatch: gormcol.Field{Table: TableNamePsImportMatch, Column: "id_import_match"},
|
||||
Name: gormcol.Field{Table: TableNamePsImportMatch, Column: "name"},
|
||||
Match: gormcol.Field{Table: TableNamePsImportMatch, Column: "match"},
|
||||
Skip: gormcol.Field{Table: TableNamePsImportMatch, Column: "skip"},
|
||||
}
|
||||
Reference in New Issue
Block a user