temp
This commit is contained in:
@@ -24,7 +24,7 @@ type BaseRepository interface {
|
||||
Restore(ctx context.Context, id string) error
|
||||
}
|
||||
|
||||
// Repository 通用仓储接口,支持泛型
|
||||
// Repository 仓储接口
|
||||
type Repository[T any] interface {
|
||||
BaseRepository
|
||||
|
||||
@@ -39,11 +39,8 @@ type Repository[T any] interface {
|
||||
UpdateBatch(ctx context.Context, entities []T) error
|
||||
DeleteBatch(ctx context.Context, ids []string) error
|
||||
|
||||
// 查询操作
|
||||
// 列表查询
|
||||
List(ctx context.Context, options ListOptions) ([]T, error)
|
||||
|
||||
// 事务支持
|
||||
WithTx(tx interface{}) Repository[T]
|
||||
}
|
||||
|
||||
// ListOptions 列表查询选项
|
||||
|
||||
Reference in New Issue
Block a user