package usecase

import "context"

type Slot struct {
	Weekday int
	Time    string
}

type SourceRef struct {
	Type          string
	PersonaID     string
	CopyMissionID string
	ScanPostID    string
	ManualSeed    string
}

type PolicySummary struct {
	AccountID         string
	Enabled           bool
	TargetDailyCount  int
	LowStockThreshold int
	LookaheadDays     int
	Timezone          string
	Slots             []Slot
	SourceRefs        []SourceRef
	UpdateAt          int64
}

type UpsertRequest struct {
	TenantID          string
	OwnerUID          string
	AccountID         string
	Enabled           bool
	TargetDailyCount  int
	LowStockThreshold int
	LookaheadDays     int
	Timezone          string
	Slots             []Slot
	SourceRefs        []SourceRef
}

type UseCase interface {
	Get(ctx context.Context, tenantID, ownerUID, accountID string) (*PolicySummary, error)
	Upsert(ctx context.Context, req UpsertRequest) (*PolicySummary, error)
	ListEnabled(ctx context.Context, limit int) ([]PolicySummary, error)
}
