diff --git a/models/meshmodel/core/v1alpha1/models.go b/models/meshmodel/core/v1alpha1/models.go index 5af1da5a..08fdf1dc 100644 --- a/models/meshmodel/core/v1alpha1/models.go +++ b/models/meshmodel/core/v1alpha1/models.go @@ -7,6 +7,7 @@ import ( "github.com/google/uuid" "github.com/layer5io/meshkit/database" + "github.com/layer5io/meshkit/models/meshmodel/core/types" "gorm.io/gorm" ) @@ -53,6 +54,14 @@ type ModelDB struct { Metadata []byte `json:"modelMetadata" gorm:"modelMetadata"` } +func (m Model) Type() types.CapabilityType { + return types.Model +} +func (m Model) GetID() uuid.UUID { + return m.ID +} + + func CreateModel(db *database.Handler, cmodel Model) (uuid.UUID, error) { byt, err := json.Marshal(cmodel) if err != nil {