// Package plan provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
package plan

import (
	core "github.com/meshery/schemas/models/core"
)

// Defines values for Currency.
const (
	Usd Currency = "usd"
)

// Defines values for PlanCadence.
const (
	Annually PlanCadence = "annually"
	Monthly  PlanCadence = "monthly"
	None     PlanCadence = "none"
)

// Defines values for PlanName.
const (
	PlanNameEnterprise   PlanName = "Enterprise"
	PlanNameFree         PlanName = "Free"
	PlanNameTeamDesigner PlanName = "Team Designer"
	PlanNameTeamOperator PlanName = "Team Operator"
)

// Defines values for PlanUnit.
const (
	PlanUnitFree PlanUnit = "free"
	PlanUnitUser PlanUnit = "user"
)

// Currency Currency code for the plan pricing.
type Currency string

// Plan Plan entity schema.
type Plan struct {
	// Cadence Billing cadence of the subscription plan.
	Cadence PlanCadence `csv:"cadence" db:"cadence" json:"cadence" yaml:"cadence"`

	// Currency Currency code for the plan pricing.
	Currency Currency `csv:"currency" db:"currency" json:"currency" yaml:"currency"`

	// Id A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	ID core.Uuid `csv:"id" db:"id" json:"id" yaml:"id"`

	// MinimumUnits Minimum number of units required for the plan.
	MinimumUnits int `csv:"minimum_units" db:"minimum_units" json:"minimumUnits" yaml:"minimumUnits"`

	// Name Display name of the subscription plan.
	Name PlanName `csv:"name" db:"name" json:"name" yaml:"name"`

	// PricePerUnit Price per unit of the plan.
	PricePerUnit float32 `csv:"price_per_unit" db:"price_per_unit" json:"pricePerUnit" yaml:"pricePerUnit"`

	// Unit Unit of consumption the plan charges against.
	Unit PlanUnit `csv:"unit" db:"unit" json:"unit" yaml:"unit"`
}

// PlanCadence Billing cadence of the subscription plan.
type PlanCadence string

// PlanName Display name of the subscription plan.
type PlanName string

// PlanPage Paginated list of plans supported by the system.
type PlanPage struct {
	// Page Current page number of the result set.
	Page int `json:"page" yaml:"page"`

	// PageSize Number of items per page.
	PageSize int `json:"pageSize" yaml:"pageSize"`

	// Plans Plans returned on the current page.
	Plans []Plan `json:"plans" yaml:"plans"`

	// TotalCount Total number of items available.
	TotalCount int `json:"totalCount" yaml:"totalCount"`
}

// PlanUnit Unit of consumption the plan charges against.
type PlanUnit string
