package release

import (
	"github.com/tidbcloud/devops/api"
	relent "github.com/tidbcloud/devops/entity/release"
)

type ListTicketsReq struct {
	api.PaginationReq

	Names    []string `form:"name"`
	Statuses []string `form:"status"`
	Releases []string `form:"release"`
}

type ListTicketsResp struct {
	api.BaseResp `json:",inline"`

	Total   int64                   `json:"total"`
	Tickets []*relent.ReleaseTicket `json:"items"`
}

type GetTicketReq struct {
	WithGithubPR bool `form:"with_github_pr"`
}

type GetTicketResp struct {
	api.BaseResp `json:",inline"`

	Ticket *relent.ReleaseTicket `json:"ticket"`
}

type UpdateTicketReq struct {
	GithubPRLocations *[]string `json:"github_pr_locations"` // ex: tidbcloud/devops#1
}
