Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSystemConfigModelNil = errors.New("system config model can't be nil")
Functions ¶
func NewSystemConfigRepository ¶
func NewSystemConfigRepository(db *gorm.DB) repository.SystemConfigRepository
NewSystemConfigRepository creates a new systemConfig repository.
Types ¶
type MultiString ¶
type MultiString []string
MultiString is a custom type for handling arrays of strings with GORM.
func (MultiString) GormDBDataType ¶
GormDBDataType gorm db data type
func (MultiString) GormDataType ¶
func (s MultiString) GormDataType() string
GormDataType gorm common data type
func (*MultiString) Scan ¶
func (s *MultiString) Scan(src any) error
Scan implements the Scanner interface for the MultiString type.
type SystemConfigModel ¶
type SystemConfigModel struct { gorm.Model Tenant string Env string Type string Config string Description string Creator string Modifier string }
SystemConfigModel is a DO used to map the entity to the database.
func (*SystemConfigModel) FromEntity ¶
func (m *SystemConfigModel) FromEntity(e *entity.SystemConfig) error
FromEntity converts an entity to a DO.
func (*SystemConfigModel) TableName ¶
func (m *SystemConfigModel) TableName() string
The TableName method returns the name of the database table that the struct is mapped to.
func (*SystemConfigModel) ToEntity ¶
func (m *SystemConfigModel) ToEntity() (*entity.SystemConfig, error)
ToEntity converts the DO to an entity.
Click to show internal directories.
Click to hide internal directories.