package schema

import "gorm.io/gorm"

type ClusterEncryptionBinding struct {
	gorm.Model

	ClusterId       uint64 `gorm:"uniqueIndex;not null"`
	TenantId        uint64 `gorm:"not null;index:idx_tenant"`
	EncryptionKeyId uint64 `gorm:"not null"`
	State           string `gorm:"type:VARCHAR(32);not null;default:'Modifying'"`
	Message         string `gorm:"type:TEXT"`
	DagInstanceId   string `gorm:"type:VARCHAR(256)"`
}

func (ClusterEncryptionBinding) TableName() string {
	return "cluster_encryption_bindings"
}
