package repository

import (
	"context"

	"haixun-backend/internal/model/publish_draft/domain/entity"
)

type ListResult struct {
	Items []entity.Draft
	Total int64
}

type Repository interface {
	EnsureIndexes(ctx context.Context) error
	Create(ctx context.Context, draft *entity.Draft) error
	Get(ctx context.Context, tenantID, ownerUID, accountID, draftID string) (*entity.Draft, error)
	List(ctx context.Context, tenantID, ownerUID, accountID string, page, pageSize int) (*ListResult, error)
	Update(ctx context.Context, draft *entity.Draft) (*entity.Draft, error)
	Delete(ctx context.Context, tenantID, ownerUID, accountID, draftID string) error
}
