test *
This commit is contained in:
@@ -17,6 +17,10 @@ type AbstractObject struct {
|
||||
Name string `json:"name" required:"true" bson:"name" validate:"required"`
|
||||
}
|
||||
|
||||
func (ao *AbstractObject) GetID() string {
|
||||
return ao.UUID
|
||||
}
|
||||
|
||||
func (dma *AbstractObject) ObjDeserialize(j map[string]interface{}) *AbstractObject {
|
||||
b, err := json.Marshal(j)
|
||||
if err != nil {
|
||||
|
@@ -2,6 +2,8 @@ package utils
|
||||
|
||||
type DBObject interface {
|
||||
GenerateID()
|
||||
GetID() string
|
||||
BindID(id string)
|
||||
GetName() string
|
||||
Deserialize(j map[string]interface{}) DBObject
|
||||
Serialize() map[string]interface{}
|
||||
|
Reference in New Issue
Block a user