missing Instance hit per Purchase +Booking
This commit is contained in:
@@ -34,6 +34,8 @@ type Booking struct {
|
|||||||
|
|
||||||
ResourceType tools.DataType `json:"resource_type,omitempty" bson:"resource_type,omitempty" validate:"required"` // ResourceType is the type of the resource
|
ResourceType tools.DataType `json:"resource_type,omitempty" bson:"resource_type,omitempty" validate:"required"` // ResourceType is the type of the resource
|
||||||
ResourceID string `json:"resource_id,omitempty" bson:"resource_id,omitempty" validate:"required"` // could be a Compute or a Storage
|
ResourceID string `json:"resource_id,omitempty" bson:"resource_id,omitempty" validate:"required"` // could be a Compute or a Storage
|
||||||
|
InstanceID string `json:"instance_id,omitempty" bson:"instance_id,omitempty" validate:"required"` // could be a Compute or a Storage
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *Booking) CalcDeltaOfExecution() map[string]map[string]models.MetricResume {
|
func (b *Booking) CalcDeltaOfExecution() map[string]map[string]models.MetricResume {
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ type PurchaseResource struct {
|
|||||||
ExecutionsID string `json:"executions_id,omitempty" bson:"executions_id,omitempty" validate:"required"` // ExecutionsID is the ID of the executions
|
ExecutionsID string `json:"executions_id,omitempty" bson:"executions_id,omitempty" validate:"required"` // ExecutionsID is the ID of the executions
|
||||||
EndDate *time.Time `json:"end_buying_date,omitempty" bson:"end_buying_date,omitempty"`
|
EndDate *time.Time `json:"end_buying_date,omitempty" bson:"end_buying_date,omitempty"`
|
||||||
ResourceID string `json:"resource_id" bson:"resource_id" validate:"required"`
|
ResourceID string `json:"resource_id" bson:"resource_id" validate:"required"`
|
||||||
|
InstanceID string `json:"instance_id,omitempty" bson:"instance_id,omitempty" validate:"required"` // could be a Compute or a Storage
|
||||||
|
|
||||||
ResourceType tools.DataType `json:"resource_type" bson:"resource_type" validate:"required"`
|
ResourceType tools.DataType `json:"resource_type" bson:"resource_type" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user