package schema

import (
	"time"

	"gorm.io/datatypes"
	"gorm.io/gorm"
)

type ReservedCapacityTemplate struct {
	ID        uint64 `gorm:"primaryKey;not null"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`

	TemplateCode    string `gorm:"type:VARCHAR(255);not null;uniqueIndex"`
	Description     string `gorm:"type:VARCHAR(1024);not null;default:''"`
	Scope           string `gorm:"type:VARCHAR(64);not null;index"`
	OrganizationId  uint64 `gorm:"not null;default:0;index"`
	Status          string `gorm:"type:VARCHAR(64);not null;index"`
	PurchasedVcpu   int64  `gorm:"not null;default:0"`
	TopologySummary string `gorm:"type:VARCHAR(1024);not null;default:''"`

	Workload      datatypes.JSON `gorm:"type:JSON"`
	FixedTopology datatypes.JSON `gorm:"type:JSON"`
}
