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,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 TableNamePsMaalInvoiceNote = "ps_maal_invoice_note"
// PsMaalInvoiceNote mapped from table <ps_maal_invoice_note>
type PsMaalInvoiceNote struct {
IDOrder int32 `gorm:"column:id_order;primaryKey" json:"id_order"`
Note *string `gorm:"column:note" json:"note"`
DateAdd time.Time `gorm:"column:date_add;not null;default:current_timestamp()" json:"date_add"`
}
// TableName PsMaalInvoiceNote's table name
func (*PsMaalInvoiceNote) TableName() string {
return TableNamePsMaalInvoiceNote
}
var PsMaalInvoiceNoteCols = struct {
IDOrder gormcol.Field
Note gormcol.Field
DateAdd gormcol.Field
}{
IDOrder: gormcol.Field{Table: TableNamePsMaalInvoiceNote, Column: "id_order"},
Note: gormcol.Field{Table: TableNamePsMaalInvoiceNote, Column: "note"},
DateAdd: gormcol.Field{Table: TableNamePsMaalInvoiceNote, Column: "date_add"},
}