优化结构

This commit is contained in:
Yvan
2026-08-20 23:02:06 +08:00
parent 63dbb4cfbc
commit e65cf0b1d0
338 changed files with 622 additions and 481 deletions
-33
View File
@@ -1,33 +0,0 @@
package biz
import (
"context"
"time"
)
type SystemParameter struct {
ID uint
CreatedAt time.Time
UpdatedAt time.Time
Name string
Key string
Value string
Desc string
StartCreatedAt *time.Time
EndCreatedAt *time.Time
}
type ParameterRepo interface {
CreateParameter(context.Context, *SystemParameter) error
UpdateParameter(context.Context, *SystemParameter) error
DeleteParameters(context.Context, []string) error
FindParameterByID(context.Context, string) (*SystemParameter, error)
FindParameterByKey(context.Context, string) (*SystemParameter, error)
ListParameters(context.Context, int, int, *SystemParameter) ([]*SystemParameter, int64, error)
}
type ParameterUsecase struct{ ParameterRepo }
func NewParameterUsecase(repo ParameterRepo) *ParameterUsecase {
return &ParameterUsecase{ParameterRepo: repo}
}