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"
const TableNamePsWebservicePermission = "ps_webservice_permission"
// PsWebservicePermission mapped from table <ps_webservice_permission>
type PsWebservicePermission struct {
IDWebservicePermission int32 `gorm:"column:id_webservice_permission;primaryKey;autoIncrement:true" json:"id_webservice_permission"`
Resource string `gorm:"column:resource;not null;uniqueIndex:resource_2,priority:1;index:resource,priority:1" json:"resource"`
Method string `gorm:"column:method;not null;uniqueIndex:resource_2,priority:2;index:method,priority:1" json:"method"`
IDWebserviceAccount int32 `gorm:"column:id_webservice_account;not null;uniqueIndex:resource_2,priority:3;index:id_webservice_account,priority:1" json:"id_webservice_account"`
}
// TableName PsWebservicePermission's table name
func (*PsWebservicePermission) TableName() string {
return TableNamePsWebservicePermission
}
var PsWebservicePermissionCols = struct {
IDWebservicePermission gormcol.Field
Resource gormcol.Field
Method gormcol.Field
IDWebserviceAccount gormcol.Field
}{
IDWebservicePermission: gormcol.Field{Table: TableNamePsWebservicePermission, Column: "id_webservice_permission"},
Resource: gormcol.Field{Table: TableNamePsWebservicePermission, Column: "resource"},
Method: gormcol.Field{Table: TableNamePsWebservicePermission, Column: "method"},
IDWebserviceAccount: gormcol.Field{Table: TableNamePsWebservicePermission, Column: "id_webservice_account"},
}