fix: align admin behavior and Kratos integrations

This commit is contained in:
2026-08-14 14:14:51 +08:00
parent 8c4c6ba661
commit e0b0e1d8c8
123 changed files with 4334 additions and 1877 deletions
+6 -4
View File
@@ -2,9 +2,12 @@ package biz
import (
"context"
"errors"
"time"
)
var ErrInvalidVersion = errors.New("版本信息格式错误")
type Version struct {
ID uint
CreatedAt time.Time
@@ -27,11 +30,10 @@ type VersionRepo interface {
CreateVersion(context.Context, *Version) error
DeleteVersions(context.Context, []uint) error
FindVersion(context.Context, uint) (*Version, error)
ListVersions(context.Context, int, int, string, string) ([]*Version, int64, error)
ListVersions(context.Context, int, int, string, string, []*time.Time) ([]*Version, int64, error)
BuildVersionBundle(context.Context, []uint, []uint, []uint) (*VersionBundle, error)
ImportVersionBundle(context.Context, *VersionBundle) error
}
type VersionUsecase struct{ repo VersionRepo }
type VersionUsecase struct{ VersionRepo }
func NewVersionUsecase(repo VersionRepo) *VersionUsecase { return &VersionUsecase{repo: repo} }
func (uc *VersionUsecase) Repo() VersionRepo { return uc.repo }
func NewVersionUsecase(repo VersionRepo) *VersionUsecase { return &VersionUsecase{VersionRepo: repo} }