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,40 @@
// 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 TableNamePsDpdpolandManifest = "ps_dpdpoland_manifest"
// PsDpdpolandManifest mapped from table <ps_dpdpoland_manifest>
type PsDpdpolandManifest struct {
IDManifest int32 `gorm:"column:id_manifest;primaryKey;autoIncrement:true" json:"id_manifest"`
IDManifestWs int32 `gorm:"column:id_manifest_ws;not null;uniqueIndex:id_manifest_ws,priority:1" json:"id_manifest_ws"`
IDPackageWs int32 `gorm:"column:id_package_ws;not null;uniqueIndex:id_manifest_ws,priority:2" json:"id_package_ws"`
DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"`
DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"`
}
// TableName PsDpdpolandManifest's table name
func (*PsDpdpolandManifest) TableName() string {
return TableNamePsDpdpolandManifest
}
var PsDpdpolandManifestCols = struct {
IDManifest gormcol.Field
IDManifestWs gormcol.Field
IDPackageWs gormcol.Field
DateAdd gormcol.Field
DateUpd gormcol.Field
}{
IDManifest: gormcol.Field{Table: TableNamePsDpdpolandManifest, Column: "id_manifest"},
IDManifestWs: gormcol.Field{Table: TableNamePsDpdpolandManifest, Column: "id_manifest_ws"},
IDPackageWs: gormcol.Field{Table: TableNamePsDpdpolandManifest, Column: "id_package_ws"},
DateAdd: gormcol.Field{Table: TableNamePsDpdpolandManifest, Column: "date_add"},
DateUpd: gormcol.Field{Table: TableNamePsDpdpolandManifest, Column: "date_upd"},
}