package api

import (
	"time"

	v1alpha1 "github.com/pfeifferj/container-mom-go/pkg/apis/containermom/v1alpha1"
)

// MongoDeployment represents a deployment stored in MongoDB
type MongoDeployment struct {
	ID             string            `bson:"_id"`
	Name           string            `bson:"name"`
	Namespace      string            `bson:"namespace"`
	SourceType     string            `bson:"sourceType"` // "git" or "container"
	GitURL         string            `bson:"gitUrl"`
	ContainerImage string            `bson:"containerImage"`
	Regions        []string          `bson:"regions"`
	Domain         string            `bson:"domain"`
	UseWildcard    bool              `bson:"useWildcard"`
	Subdomain      string            `bson:"subdomain"`
	Status         string            `bson:"status"`
	CreatedAt      time.Time         `bson:"createdAt"`
	UpdatedAt      time.Time         `bson:"updatedAt"`
	Env            []v1alpha1.EnvVar `bson:"env"`
	Resources      struct {
		CPU    float64 `bson:"cpu"` // Changed to float64 to match MongoDB
		Memory string  `bson:"memory"`
	} `bson:"resources"`
}
