diff --git a/backend/src/apiserver/model/resource_reference.go b/backend/src/apiserver/model/resource_reference.go index 043dbd3a0c0..6336e43571d 100644 --- a/backend/src/apiserver/model/resource_reference.go +++ b/backend/src/apiserver/model/resource_reference.go @@ -22,16 +22,16 @@ type ResourceReference struct { ResourceUUID string `gorm:"column:ResourceUUID; not null; primary_key"` // The type of the resource object - ResourceType common.ResourceType `gorm:"column:ResourceType; not null; primary_key"` + ResourceType common.ResourceType `gorm:"column:ResourceType; not null; primary_key; index:referencefilter"` // The ID of the resource that been referenced to. - ReferenceUUID string `gorm:"column:ReferenceUUID; not null; "` + ReferenceUUID string `gorm:"column:ReferenceUUID; not null; index:referencefilter"` // The name of the resource that been referenced to. ReferenceName string `gorm:"column:ReferenceName; not null; "` // The type of the resource that been referenced to. - ReferenceType common.ResourceType `gorm:"column:ReferenceType; not null; primary_key"` + ReferenceType common.ResourceType `gorm:"column:ReferenceType; not null; primary_key; index:referencefilter"` // The relationship between the resource object and the resource that been referenced to. Relationship common.Relationship `gorm:"column:Relationship; not null; "`