22 lines
997 B
Go
22 lines
997 B
Go
|
|
package admin
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
|
||
|
|
"tyapi-server/internal/application/admin/dto/commands"
|
||
|
|
"tyapi-server/internal/application/admin/dto/queries"
|
||
|
|
"tyapi-server/internal/application/admin/dto/responses"
|
||
|
|
)
|
||
|
|
|
||
|
|
// AdminApplicationService 管理员应用服务接口
|
||
|
|
type AdminApplicationService interface {
|
||
|
|
Login(ctx context.Context, cmd *commands.AdminLoginCommand) (*responses.AdminLoginResponse, error)
|
||
|
|
CreateAdmin(ctx context.Context, cmd *commands.CreateAdminCommand) error
|
||
|
|
UpdateAdmin(ctx context.Context, cmd *commands.UpdateAdminCommand) error
|
||
|
|
ChangePassword(ctx context.Context, cmd *commands.ChangeAdminPasswordCommand) error
|
||
|
|
ListAdmins(ctx context.Context, query *queries.ListAdminsQuery) (*responses.AdminListResponse, error)
|
||
|
|
GetAdminByID(ctx context.Context, query *queries.GetAdminInfoQuery) (*responses.AdminInfoResponse, error)
|
||
|
|
DeleteAdmin(ctx context.Context, cmd *commands.DeleteAdminCommand) error
|
||
|
|
GetAdminStats(ctx context.Context) (*responses.AdminStatsResponse, error)
|
||
|
|
}
|