package forms

type PartnerConfigs struct {
	// Determines whether customers can view their bills with list prices in the TiDB Cloud console.
	EnableBillsView bool `json:"enableBillsView" example:"true"`
}

type CustomerBills struct {
	CustomerID uint `json:"-"`
	// The name of the customer.
	CustomerName string `json:"customerName" example:"PingCAP"`
	BillsCosts
}

type SummaryBillsByCustomer struct {
	// The breakdown of bills by customers of a partner.
	Customers []CustomerBills `json:"customers"`
	// Costs not incurred by the customer but by the partner, such as support plan for a MSP.
	OtherCharges []BillsOtherName `json:"otherCharges"`
}

type PartnerBillsExplorer struct {
	BillsExplorer

	BillsServiceCosts []BillsServiceCosts `json:"-"`
	//A breakdown of the bill by services.
	SummaryByService []PartnerBillsServiceCosts `json:"summaryByService"`
	//A breakdown of the bill by customers.
	SummaryByCustomer SummaryBillsByCustomer `json:"summaryByCustomer"`
}

type PartnerBillsDetail struct {
	BillsDetail

	CustomerID string `json:"-"`

	CustomerName string `json:"customerName" example:"PingCAP"`
}

type PartnerBillsDetails struct {
	Year  int `json:"-"`
	Month int `json:"-"`

	BillsDetails []PartnerBillsDetail `json:"details"`
}

type PartnerInvoicedBillsDetail struct {
	BillsDetail

	InvoicedDate string `json:"invoicedDate"`

	PaymentCode string `json:"paymentCode"`

	CustomerID string `json:"-"`

	CustomerName string `json:"customerName" example:"PingCAP"`
}

type PartnerInvoicedBillsDetails struct {
	Year  int `json:"-"`
	Month int `json:"-"`

	BillsDetails []PartnerInvoicedBillsDetail `json:"details"`
}

type Customer struct {
	// The unique identifier for the customer.
	ID string `json:"id"`
	// The name of the customer.
	Name string `json:"name" example:"PingCAP"`
}

type PartnerTrendsArgs struct {
	TrendsArgs

	Customers []*Customer `json:"customers"`
}

type PartnerTrendsFilter struct {
	TrendsFilter

	CustomerIDs []string `json:"customers"`
}

type PartnerTrendsInput struct {
	Filter PartnerTrendsFilter `json:"filter"`
	Groups Groups              `json:"groups"`
}

type PartnerBillsCostExplorerBreakdown struct {
	BillsCosts
	BilledDate string `json:"billedDate" example:"2023-01-01"`
	DetailName string `json:"detailName" example:"customer01"`
	DetailKey  string `json:"detailKey" example:"122"`
}

type PartnerBillsCostExplorerElements struct {
	BillsCosts
	BilledDate string                              `json:"billedDate" example:"2023-01-01"`
	Breakdown  []PartnerBillsCostExplorerBreakdown `json:"breakdown"`
}

type PartnerBillsCostExplorer struct {
	BillsCosts
	Elements []PartnerBillsCostExplorerElements `json:"elements"`
}
