package usecase

import "context"

type DraftSummary struct {
	ID        string
	AccountID string
	Title     string
	Text      string
	Tags      []string
	CreateAt  int64
	UpdateAt  int64
}

type CreateRequest struct {
	TenantID  string
	OwnerUID  string
	AccountID string
	Title     string
	Text      string
	Tags      []string
}

type UpdateRequest struct {
	TenantID  string
	OwnerUID  string
	AccountID string
	DraftID   string
	Title     *string
	Text      *string
	Tags      *[]string
}

type ListResult struct {
	Items      []DraftSummary
	Total      int64
	Page       int
	PageSize   int
	TotalPages int
}

type UseCase interface {
	Create(ctx context.Context, req CreateRequest) (*DraftSummary, error)
	Get(ctx context.Context, tenantID, ownerUID, accountID, draftID string) (*DraftSummary, error)
	List(ctx context.Context, tenantID, ownerUID, accountID string, page, pageSize int) (*ListResult, error)
	Update(ctx context.Context, req UpdateRequest) (*DraftSummary, error)
	Delete(ctx context.Context, tenantID, ownerUID, accountID, draftID string) error
}
