package workspace

import (
	baseapi "github.com/tidbcloud/aisupport/packages/sdk-go/contracts/api/base"
	wsent "github.com/tidbcloud/aisupport/packages/sdk-go/contracts/entity/ticket-manager/workspace"
)

type ListAdvicesRequest struct {
	baseapi.PageRequest

	WorkspaceID uint64               `form:"workspace_id" json:"workspace_id"`
	Type        []wsent.AdivceType   `form:"type" json:"type"`
	Status      []wsent.AdviceStatus `form:"status" json:"status"`
}

type ListAdvicesResponse struct {
	*baseapi.BaseResponse

	Advices []*wsent.Advice `json:"advices"`
	Total   int64           `json:"total"`
}

type GetAdviceResponse struct {
	*baseapi.BaseResponse

	Advice *wsent.Advice `json:"advice"`
}

type CreateAdviceRequest struct {
	WorkspaceID    uint64           `json:"workspace_id" binding:"required"`
	Description    string           `json:"description" binding:"required"`
	Type           wsent.AdivceType `json:"type" binding:"required"`
	Data           wsent.AdviceData `json:"data" binding:"required"`
	ReplyMessageID string           `json:"reply_message_id,omitempty"`
}

type CreateAdviceResponse struct {
	*baseapi.BaseResponse

	Advice *wsent.Advice `json:"advice"`
}

type UpdateAdviceRequest struct {
	Description *string           `json:"description,omitempty"`
	Data        *wsent.AdviceData `json:"data,omitempty"`
}

type UpdateAdviceResponse struct {
	*baseapi.BaseResponse

	Advice *wsent.Advice `json:"advice"`
}

type ApplyAdviceResponse struct {
	*baseapi.BaseResponse

	Advice *wsent.Advice `json:"advice"`
}

type IgnoreAdviceResponse struct {
	*baseapi.BaseResponse

	Advice *wsent.Advice `json:"advice"`
}

type DeleteAdviceResponse struct {
	*baseapi.BaseResponse

	Advice *wsent.Advice `json:"advice"`
}
