23 lines
920 B
Go
23 lines
920 B
Go
package repository
|
|
|
|
import (
|
|
"context"
|
|
|
|
"haixun-backend/internal/model/threads_account/domain/entity"
|
|
)
|
|
|
|
type Repository interface {
|
|
EnsureIndexes(ctx context.Context) error
|
|
Create(ctx context.Context, account *entity.Account) (*entity.Account, error)
|
|
FindByID(ctx context.Context, tenantID, ownerUID, accountID string) (*entity.Account, error)
|
|
ListByOwner(ctx context.Context, tenantID, ownerUID string) ([]*entity.Account, error)
|
|
UpdateShell(ctx context.Context, tenantID, ownerUID, accountID string, displayName, username, personaID *string) (*entity.Account, error)
|
|
SoftDelete(ctx context.Context, tenantID, ownerUID, accountID string) error
|
|
}
|
|
|
|
type SecretsRepository interface {
|
|
EnsureIndexes(ctx context.Context) error
|
|
FindByAccountID(ctx context.Context, accountID string) (*entity.Secrets, error)
|
|
SaveBrowserStorageState(ctx context.Context, accountID, storageState string) (*entity.Secrets, error)
|
|
}
|