package cloudconfig

import (
	ccent "github.com/tidbcloud/devops/entity/cloudconfig"
)

type MetaProfile struct {
	ClusterType           ccent.ClusterType `json:"cluster_type"`
	ProfileId             int64             `json:"profile_id"`
	ProfileName           string            `json:"profile_name"`
	Description           string            `json:"description"`
	Tags                  map[string]string `json:"tags"`
	ComponentImageTags    map[string]string `json:"component_image_tags"`
	ConfigCustomTemplates map[string]int64  `json:"config_custom_templates"`
	ComponentVersions     map[string]string `json:"component_versions"`
}

type CreateMetaProfileReq struct {
	ClusterType           ccent.ClusterType `json:"cluster_type" binding:"required"`
	ProfileName           string            `json:"profile_name" binding:"required"`
	Description           string            `json:"description"`
	TenantID              string            `json:"tenant_id" binding:"required"`
	ComponentImageTags    map[string]string `json:"component_image_tags" binding:"required"`
	ConfigCustomTemplates map[string]int64  `json:"config_custom_templates"`
	ComponentVersions     map[string]string `json:"component_versions"`
}

type ListMetaProfilesReq struct {
	Page        int32             `form:"page,default=1" binding:"gt=0" json:"page"`
	PerPage     int32             `form:"per_page,default=100" binding:"gt=0,lte=500" json:"per_page"`
	ClusterType ccent.ClusterType `form:"cluster_type" json:"cluster_type"`
	TenantID    string            `form:"tenant_id" json:"tenant_id"`
	ProfileName string            `form:"profile_name" json:"profile_name"`
}

type ListMetaProfilesResp struct {
	Items []*MetaProfile `json:"items"`
	Total int64          `json:"total"`
}
