27 lines
786 B
Go
27 lines
786 B
Go
package repository
|
|
|
|
import (
|
|
"app-cloudep-member-server/pkg/domain/entity"
|
|
"context"
|
|
|
|
"go.mongodb.org/mongo-driver/mongo"
|
|
)
|
|
|
|
type AccountRepository interface {
|
|
Insert(ctx context.Context, data *entity.Account) error
|
|
FindOne(ctx context.Context, id string) (*entity.Account, error)
|
|
Update(ctx context.Context, data *entity.Account) (*mongo.UpdateResult, error)
|
|
Delete(ctx context.Context, id string) (int64, error)
|
|
FindOneByAccount(ctx context.Context, loginID string) (*entity.Account, error)
|
|
UpdateTokenByLoginID(ctx context.Context, account string, token string) error
|
|
AccountIndexUP
|
|
}
|
|
|
|
type AccountIndexUP interface {
|
|
Index20241226001UP(ctx context.Context) (*mongo.Cursor, error)
|
|
}
|
|
|
|
// type AccountIndexDown interface {
|
|
// Index20241226001Down(ctx context.Context)
|
|
// }
|