优化结构
This commit is contained in:
@@ -6,13 +6,18 @@ import (
|
||||
)
|
||||
|
||||
type SystemParameter struct {
|
||||
ID uint
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
ID uint
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
Name string
|
||||
Key string
|
||||
Value string
|
||||
Desc string
|
||||
}
|
||||
|
||||
type SystemParameterFilter struct {
|
||||
Name string
|
||||
Key string
|
||||
Value string
|
||||
Desc string
|
||||
StartCreatedAt *time.Time
|
||||
EndCreatedAt *time.Time
|
||||
}
|
||||
@@ -23,7 +28,7 @@ type ParameterRepo interface {
|
||||
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)
|
||||
ListParameters(context.Context, int, int, *SystemParameterFilter) ([]*SystemParameter, int64, error)
|
||||
}
|
||||
|
||||
type ParameterUsecase struct{ ParameterRepo }
|
||||
|
||||
Reference in New Issue
Block a user