Use table name constant in Cols for type safety
This commit is contained in:
31
app/model/dbmodel/ps_export_invoice.go
Normal file
31
app/model/dbmodel/ps_export_invoice.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 TableNamePsExportInvoice = "ps_export_invoice"
|
||||
|
||||
// PsExportInvoice mapped from table <ps_export_invoice>
|
||||
type PsExportInvoice struct {
|
||||
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
|
||||
IDOrder int32 `gorm:"column:id_order;not null" json:"id_order"`
|
||||
IsExport bool `gorm:"column:is_export;not null" json:"is_export"`
|
||||
}
|
||||
|
||||
// TableName PsExportInvoice's table name
|
||||
func (*PsExportInvoice) TableName() string {
|
||||
return TableNamePsExportInvoice
|
||||
}
|
||||
|
||||
var PsExportInvoiceCols = struct {
|
||||
ID gormcol.Field
|
||||
IDOrder gormcol.Field
|
||||
IsExport gormcol.Field
|
||||
}{
|
||||
ID: gormcol.Field{Table: TableNamePsExportInvoice, Column: "id"},
|
||||
IDOrder: gormcol.Field{Table: TableNamePsExportInvoice, Column: "id_order"},
|
||||
IsExport: gormcol.Field{Table: TableNamePsExportInvoice, Column: "is_export"},
|
||||
}
|
||||
Reference in New Issue
Block a user