cargo-platform/cmd/api/internal/domain/users_roles.go
2026-08-16 01:40:21 +07:00

31 lines
1.4 KiB
Go

// 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 domain
import (
"time"
)
const TableNameUsersRole = "users_roles"
// UsersRole mapped from table <users_roles>
type UsersRole struct {
ID string `gorm:"column:id;type:character(26);primaryKey;default:generate_ulid()" json:"id"`
Name *string `gorm:"column:name;type:character varying(255)" json:"name"`
MerchantID *string `gorm:"column:merchant_id;type:character(26)" json:"merchant_id"`
CreatedBy *string `gorm:"column:created_by;type:character(26)" json:"created_by"`
CreatedOn *time.Time `gorm:"column:created_on;type:timestamp without time zone;default:now()" json:"created_on"`
UpdatedBy *string `gorm:"column:updated_by;type:character(26)" json:"updated_by"`
UpdatedOn *time.Time `gorm:"column:updated_on;type:timestamp without time zone;default:now()" json:"updated_on"`
RoleKey string `gorm:"column:role_key;type:character varying(20);not null" json:"role_key"`
Merchant_Relation Merchant `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"`
Userss_Relation []User `gorm:"foreignKey:users_role_id;references:id" json:"userss_relation"`
}
// TableName UsersRole's table name
func (*UsersRole) TableName() string {
return TableNameUsersRole
}