23 lines
462 B
Go
23 lines
462 B
Go
package storage
|
|
|
|
import (
|
|
"goalfymax-admin/internal/models"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type BalanceOperationLogStorage interface {
|
|
Create(log *models.BalanceOperationLog) error
|
|
}
|
|
|
|
type balanceOperationLogStorage struct {
|
|
db *gorm.DB
|
|
}
|
|
|
|
func NewBalanceOperationLogStorage() BalanceOperationLogStorage {
|
|
return &balanceOperationLogStorage{db: DB}
|
|
}
|
|
|
|
func (s *balanceOperationLogStorage) Create(log *models.BalanceOperationLog) error {
|
|
return s.db.Create(log).Error
|
|
}
|