purchase_resource

package
v0.0.0-...-c35b06e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PurchaseResource

type PurchaseResource struct {
	utils.AbstractObject
	DestPeerID   string                 `json:"dest_peer_id" bson:"dest_peer_id"`
	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 (*PurchaseResource) CanDelete

func (r *PurchaseResource) CanDelete() bool

func (*PurchaseResource) CanUpdate

func (r *PurchaseResource) CanUpdate(set utils.DBObject) (bool, utils.DBObject)

func (*PurchaseResource) GetAccessor

func (d *PurchaseResource) GetAccessor(request *tools.APIRequest) utils.Accessor

type PurchaseResourceMongoAccessor

type PurchaseResourceMongoAccessor struct {
	utils.AbstractAccessor // AbstractAccessor contains the basic fields of an accessor (model, caller)
}

func NewAccessor

func NewAccessor(request *tools.APIRequest) *PurchaseResourceMongoAccessor

New creates a new instance of the bookingMongoAccessor

func (*PurchaseResourceMongoAccessor) CopyOne

func (*PurchaseResourceMongoAccessor) DeleteOne

* Nothing special here, just the basic CRUD operations

func (*PurchaseResourceMongoAccessor) LoadAll

func (*PurchaseResourceMongoAccessor) LoadOne

func (*PurchaseResourceMongoAccessor) Search

func (a *PurchaseResourceMongoAccessor) Search(filters *dbs.Filters, search string, isDraft bool) ([]utils.ShallowDBObject, int, error)

func (*PurchaseResourceMongoAccessor) StoreOne

func (*PurchaseResourceMongoAccessor) UpdateOne

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL