package forms

import (
	"time"

	"github.com/shopspring/decimal"
)

type MspBills struct {
	//The overall information for a bill in the specified organization.
	BillsOverView BillsOverview `json:"overview"`
	//A breakdown of the bill by service.
	BillsServiceCosts []BillsServiceCosts `json:"summaryByService"`
	//Month of bills happens to a specific MSP.
	SummaryByCustomer []SummaryByCustomer `json:"summaryByCustomer"`
}

type SummaryByCustomer struct {
	//The Organization ID of MSP
	CustomerID uint `json:"customerID"`
	//The bill generated for a specific MSP customer in the specified month.
	MspCustomerBills BillsExplorer `json:"mspCustomerBills"`
}

type MspCredit struct {
	//The code of a credit.
	CreditCode string `json:"creditCode" example:"498c7f44-656f-4944-b455-0695faa5d4f9"`
	//The status of a credit.
	Status string `json:"status" example:"active"`
	//The service to which a credit is applicable.
	Services string `json:"services" example:"General Product"`
	//The total amount of credit.
	Credit decimal.Decimal `json:"credit" example:"1000.00"`
	//The remaining amount of a credit.
	RemainingCredit decimal.Decimal `json:"remainingCredit" example:"1000.00"`
	//Effective start date of a credit.
	StartDate time.Time `json:"startDate" example:"2023-11-01T00:00:00Z"`
	//Expired date of a credit.
	ExpiryDate time.Time `json:"expiryDate" example:"2023-12-01T00:00:00Z"`
}

type MspDiscount struct {
	//The code of a discount.
	DiscountCode string `json:"discountCode" example:"498c7f44-656f-4944-b455-0695faa5d4f9"`
	//The status of a discount.
	Status string `json:"status" example:"valid"`
	//The service to which a discount is applicable.
	Services string `json:"services" example:"Node Compute, Changefeed,"`
	//The percentage is deducted from the original price. For example, a 20% discount on a $100 item would result in a discounted price of $80.
	PercentageDiscount string `json:"percentageDiscount" example:"20%"`
	//The description of a discount.
	Description string `json:"description"`
	//Effective start date of a credit.
	StartDate time.Time `json:"startDate" example:"2023-11-01T00:00:00Z"`
	//Expired date of a credit.
	ExpiryDate time.Time `json:"expiryDate" example:"2023-12-01T00:00:00Z"`
}
