Merge branch 'main' of https://cloud.o-forge.io/core/oc-lib
This commit is contained in:
@@ -3,7 +3,6 @@ package purchase_resource
|
||||
import (
|
||||
"time"
|
||||
|
||||
"cloud.o-forge.io/core/oc-lib/models/common/pricing"
|
||||
"cloud.o-forge.io/core/oc-lib/models/utils"
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
)
|
||||
@@ -11,11 +10,11 @@ import (
|
||||
type PurchaseResource struct {
|
||||
utils.AbstractObject
|
||||
DestPeerID string `json:"dest_peer_id" bson:"dest_peer_id"`
|
||||
PricedItem pricing.PricedItemITF `json:"priced_item,omitempty" bson:"priced_item,omitempty" validate:"required"`
|
||||
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"`
|
||||
ResourceID string `json:"resource_id" bson:"resource_id" validate:"required"`
|
||||
ResourceType tools.DataType `json:"resource_type" bson:"resource_type" validate:"required"`
|
||||
PricedItem map[string]interface{} `json:"priced_item,omitempty" bson:"priced_item,omitempty" validate:"required"`
|
||||
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"`
|
||||
ResourceID string `json:"resource_id" bson:"resource_id" validate:"required"`
|
||||
ResourceType tools.DataType `json:"resource_type" bson:"resource_type" validate:"required"`
|
||||
}
|
||||
|
||||
func (d *PurchaseResource) GetAccessor(request *tools.APIRequest) utils.Accessor {
|
||||
|
||||
Reference in New Issue
Block a user