package general

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"`
	CreateByID model.ID  `json:"createByID"`
	UpdateByID model.ID  `json:"updateByID"`
	CreateBy   string    `json:"createBy,omitempty" dbo:"-"`
	UpdateBy   string    `json:"updateBy,omitempty" dbo:"-"`
}

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"`
}
