Use table name constant in Cols for type safety

This commit is contained in:
2026-03-29 15:29:39 +02:00
parent 0cfddddccb
commit a53e24c5b8
315 changed files with 13092 additions and 5 deletions

View 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"},
}