package schema

import "gorm.io/gorm"

type Provider struct {
	gorm.Model

	Name        string `gorm:"index:idx_name,not null;type:ENUM('aws', 'gcp', 'azure','alicloud');uniqueIndex:idx_provider_service_plan_name,priority:2"`
	DisplayName string `gorm:"not null;type:VARCHAR(255)"`
	ServicePlan string `gorm:"type:ENUM('Starter', 'Essential', 'Premium', 'BYOC', 'Premium_Reserved', 'Essential_V2');not null;index:idx_provider_service_plan;uniqueIndex:idx_provider_service_plan_name,priority:1"`
	IsPublic    bool   `gorm:"default:true"`
	Status      string `gorm:"not null;type:ENUM('active', 'inactive')"`

	Regions []*Region `gorm:"foreignkey:ProviderId"`
}
