20 lines
966 B
Go
20 lines
966 B
Go
package repository
|
|
|
|
import (
|
|
"context"
|
|
|
|
"haixun-backend/internal/model/copy_draft/domain/entity"
|
|
)
|
|
|
|
type Repository interface {
|
|
EnsureIndexes(ctx context.Context) error
|
|
Create(ctx context.Context, draft *entity.CopyDraft) error
|
|
CreateMany(ctx context.Context, drafts []*entity.CopyDraft) error
|
|
Get(ctx context.Context, tenantID, ownerUID, personaID, draftID string) (*entity.CopyDraft, error)
|
|
Update(ctx context.Context, tenantID, ownerUID, personaID, draftID string, patch map[string]interface{}) (*entity.CopyDraft, error)
|
|
DeleteByMissionAndType(ctx context.Context, tenantID, ownerUID, personaID, missionID, draftType string) error
|
|
DeleteByMission(ctx context.Context, tenantID, ownerUID, personaID, missionID string) error
|
|
List(ctx context.Context, tenantID, ownerUID, personaID string, limit int) ([]entity.CopyDraft, error)
|
|
ListByMission(ctx context.Context, tenantID, ownerUID, personaID, missionID string, limit int) ([]entity.CopyDraft, error)
|
|
}
|