Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountLog ¶
type AccountLog[T AccountLogDataRecordable] struct { BaseAccountLog `gorm:"embedded"` Data T `gorm:"type:json"` }
账本
type AccountLogDao ¶
type AccountLogDao struct {
// contains filtered or unexported fields
}
func NewDao ¶
func NewDao(db ...*gorm.DB) *AccountLogDao
func (*AccountLogDao) RecordAccountLogMapping ¶
func (d *AccountLogDao) RecordAccountLogMapping(logModel AccountLogger) (AccountLogMapping, error)
type AccountLogDataProvider ¶
type AccountLogDataProvider interface {
GetLogDataModel() AccountLogDataRecordable
}
type AccountLogDataRecordable ¶
type AccountLogDataRecordable interface {
Record(baseLog BaseAccountLog, tx *gorm.DB) (AccountLogger, error)
}
type AccountLogMapping ¶
type AccountLogMapping struct {
ID uint `gorm:"primarykey"`
AccountId uint `gorm:"index:idx_account_id"`
LogTable string
LogId uint
CreatedAt time.Time `gorm:"type:TIMESTAMP"`
UpdatedAt time.Time `gorm:"type:TIMESTAMP"`
DeletedAt gorm.DeletedAt `gorm:"index;type:TIMESTAMP"`
}
func (*AccountLogMapping) TableName ¶
func (a *AccountLogMapping) TableName() string
type AccountLogger ¶
type AccountMappingLog ¶
type AccountMappingLog struct {
BaseAccountLog `gorm:"embedded"`
Data AccountMappingLogData `gorm:"embedded;embeddedPrefix:data_"`
}
func (*AccountMappingLog) RecordMapping ¶
func (a *AccountMappingLog) RecordMapping(tx *gorm.DB) (AccountLogMapping, error)
func (*AccountMappingLog) TableName ¶
func (a *AccountMappingLog) TableName() string
type AccountMappingLogData ¶
func (*AccountMappingLogData) Record ¶
func (m *AccountMappingLogData) Record(baseLog BaseAccountLog, tx *gorm.DB) (AccountLogger, error)
type BaseAccountLog ¶
type BaseAccountLog struct {
ID uint `gorm:"primarykey"`
UserId uint `gorm:"index:idx_user_id;not null"`
AccountId uint `gorm:"index:idx_account_id;not null"`
Operation constant.LogOperation `gorm:"not null"`
}
func (*BaseAccountLog) GetAccountId ¶
func (b *BaseAccountLog) GetAccountId() uint
func (*BaseAccountLog) GetId ¶
func (b *BaseAccountLog) GetId() uint
Click to show internal directories.
Click to hide internal directories.