deserialize
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
type DatacenterResource struct {
|
||||
resources.AbstractResource
|
||||
BookingPrice int `bson:"booking_price" json:"booking_price"`
|
||||
BookingPrice int `bson:"booking_price" json:"booking_price"`
|
||||
|
||||
CPU DatacenterCpuModel `bson:"cpu,omitempty" json:"cpu,omitempty"`
|
||||
RAM DatacenterMemoryModel `bson:"ram,omitempty" json:"ram,omitempty"`
|
||||
@@ -42,7 +42,6 @@ func (dma *DatacenterResource) Deserialize(j map[string]interface{}) utils.DBObj
|
||||
return nil
|
||||
}
|
||||
json.Unmarshal(b, dma)
|
||||
dma.AbstractResource.ObjDeserialize(j)
|
||||
return dma
|
||||
}
|
||||
|
||||
@@ -53,7 +52,6 @@ func (dma *DatacenterResource) Serialize() map[string]interface{} {
|
||||
return nil
|
||||
}
|
||||
json.Unmarshal(b, dma)
|
||||
dma.AbstractResource.ObjSerialize()
|
||||
return m
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user