backend/pkg/member/domain/repository/account_uid.go

25 lines
839 B
Go
Raw Permalink Normal View History

2025-10-01 16:30:27 +00:00
package repository
import (
"context"
"backend/pkg/member/domain/entity"
"go.mongodb.org/mongo-driver/v2/mongo"
)
type AccountUIDRepository interface {
Insert(ctx context.Context, data *entity.AccountUID) error
FindOne(ctx context.Context, id string) (*entity.AccountUID, error)
Update(ctx context.Context, data *entity.AccountUID) (*mongo.UpdateResult, error)
Delete(ctx context.Context, id string) (int64, error)
FindUIDByLoginID(ctx context.Context, loginID string) (*entity.AccountUID, error)
AccountUIDIndexUP
}
// Index20241226001Up 這樣方便管理,知道是 這張表 20241226 第一個新增的 index 之後有版本遷移也可以這樣寫,先快速這樣做,等之後找到更好的迭代工具,在用
type AccountUIDIndexUP interface {
Index20241226001UP(ctx context.Context) (*mongo.Cursor, error)
}