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,46 @@
// 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 TableNamePsPsgdprConsent = "ps_psgdpr_consent"
// PsPsgdprConsent mapped from table <ps_psgdpr_consent>
type PsPsgdprConsent struct {
IDGdprConsent int32 `gorm:"column:id_gdpr_consent;primaryKey;autoIncrement:true" json:"id_gdpr_consent"`
IDModule int32 `gorm:"column:id_module;primaryKey" json:"id_module"`
Active int32 `gorm:"column:active;not null" json:"active"`
Error *int32 `gorm:"column:error" json:"error"`
ErrorMessage *string `gorm:"column:error_message" json:"error_message"`
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 PsPsgdprConsent's table name
func (*PsPsgdprConsent) TableName() string {
return TableNamePsPsgdprConsent
}
var PsPsgdprConsentCols = struct {
IDGdprConsent gormcol.Field
IDModule gormcol.Field
Active gormcol.Field
Error gormcol.Field
ErrorMessage gormcol.Field
DateAdd gormcol.Field
DateUpd gormcol.Field
}{
IDGdprConsent: gormcol.Field{Table: TableNamePsPsgdprConsent, Column: "id_gdpr_consent"},
IDModule: gormcol.Field{Table: TableNamePsPsgdprConsent, Column: "id_module"},
Active: gormcol.Field{Table: TableNamePsPsgdprConsent, Column: "active"},
Error: gormcol.Field{Table: TableNamePsPsgdprConsent, Column: "error"},
ErrorMessage: gormcol.Field{Table: TableNamePsPsgdprConsent, Column: "error_message"},
DateAdd: gormcol.Field{Table: TableNamePsPsgdprConsent, Column: "date_add"},
DateUpd: gormcol.Field{Table: TableNamePsPsgdprConsent, Column: "date_upd"},
}