Skip to content

Commit a85f6ae

Browse files
committed
make model entity interface compatible
Signed-off-by: Pranav Singh <pranavsingh02@hotmail.com>
1 parent 4577fd6 commit a85f6ae

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

models/meshmodel/core/v1alpha1/models.go

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77

88
"github.com/google/uuid"
99
"github.com/layer5io/meshkit/database"
10+
"github.com/layer5io/meshkit/models/meshmodel/core/types"
1011
"gorm.io/gorm"
1112
)
1213

@@ -53,6 +54,14 @@ type ModelDB struct {
5354
Metadata []byte `json:"modelMetadata" gorm:"modelMetadata"`
5455
}
5556

57+
func (m Model) Type() types.CapabilityType {
58+
return types.Model
59+
}
60+
func (m Model) GetID() uuid.UUID {
61+
return m.ID
62+
}
63+
64+
5665
func CreateModel(db *database.Handler, cmodel Model) (uuid.UUID, error) {
5766
byt, err := json.Marshal(cmodel)
5867
if err != nil {

0 commit comments

Comments
 (0)