package common

import (
	"time"

	"github.com/pingcap/test-infra/common/model"
)

type PlanQueryOpts struct {
	IDs            []model.ID
	Type           model.TestPlanType
	Branch         string
	Tags           []string
	IncludeDeleted bool
	FromUpdatedAt  *time.Time

	// Return all fields
	AllFields        bool
	SortedBy         PlanSortedBy
	SortedDescending bool
	Offset, Count    uint
}

type PlanSortedBy string

const (
	PlanSortedByName      PlanSortedBy = "plans.name"
	PlanSortedByUpdatedAt PlanSortedBy = "plans.updated_at"
)
