package schema

import "gorm.io/gorm"

type AwsVpcPeering struct {
	gorm.Model

	TenantID         uint64 `gorm:"index"`
	ProjectID        uint64 `gorm:"index:project_region,priority:1"`
	PeeringType      string `gorm:"type:ENUM('dbaas','customer','customer_readonly');not null;default:'customer'"`
	Region           string `gorm:"type:VARCHAR(255);index:project_region,priority:2"`
	PeerRegion       string `gorm:"type:VARCHAR(255);not null"`
	PeerAwsAccountID string `gorm:"type:VARCHAR(255);not null"`
	PeerAwsVpcID     string `gorm:"type:VARCHAR(255);not null"`
	PeerVpcCidr      string `gorm:"type:VARCHAR(255);not null"`
}

type GcpVpcPeering struct {
	gorm.Model

	TenantID           uint64 `gorm:"index"`
	ProjectID          uint64 `gorm:"index:project_region,priority:1"`
	PeeringType        string `gorm:"type:ENUM('dbaas','customer','customer_readonly');not null;default:'customer'"`
	Region             string `gorm:"type:VARCHAR(255);index:project_region,priority:2"`
	PeerRegion         string `gorm:"type:VARCHAR(255);not null"`
	PeerGcpProjectID   string `gorm:"type:VARCHAR(255);not null"`
	PeerGcpNetworkName string `gorm:"type:VARCHAR(255);not null"`
	PeerVpcCidr        string `gorm:"type:VARCHAR(255);not null"`
}

type AzureVpcPeering struct {
	gorm.Model
}
