package taskruns

import (
	"time"

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

const CurrentApiVersion = "api/v1"

type GeneralHeader struct {
	ApiVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
}

type GeneralMetaData struct {
	ID       model.ID  `json:"id"`
	CreateAt time.Time `json:"createAt"`
	UpdateAt time.Time `json:"updateAt"`
	CreateBy string    `json:"createBy"`
	UpdateBy string    `json:"updateBy"`
}

type GeneralCreateOpts struct {
	DryRun bool `schema:"dryRun,omitempty"`
}

type GeneralUpdateOpts struct {
	DryRun bool `schema:"dryRun,omitempty"`
}

type GeneralDeleteOpts struct {
	DryRun bool `schema:"dryRun,omitempty"`
}

type GeneralGetOpts struct {
	Pretty bool `schema:"pretty,omitempty"`
}

type GeneralListOpts struct {
	Offset    uint `schema:"offset,omitempty"`
	Count     uint `schema:"count,omitempty"`
	WithTotal bool `schema:"withTotal,omitempty"`
}
