app-cloudep-member-server/pkg/domain/repository/auto_id.go

24 lines
669 B
Go

package repository
import (
"app-cloudep-member-server/pkg/domain/entity"
"context"
"go.mongodb.org/mongo-driver/mongo"
)
type AutoIDRepository interface {
Insert(ctx context.Context, data *entity.AutoID) error
FindOne(ctx context.Context, id string) (*entity.AutoID, error)
Update(ctx context.Context, data *entity.AutoID) (*mongo.UpdateResult, error)
Delete(ctx context.Context, id string) (int64, error)
Inc(ctx context.Context, data *entity.AutoID) error
GetUIDFromNum(num int64) (string, error)
GetNumFromUID(uid string) (int64, error)
AutoIDIndexUP
}
type AutoIDIndexUP interface {
Index20241226001UP(ctx context.Context) (*mongo.Cursor, error)
}