Food Delivery System

Under Review

TOOLSFINANCIAL

Contract purpose

The manager will introduce a order, add items to it ( item IDs), set its price once all items were added and mark it as sent. Once the customer receives it, he will mark it as delivered and he will pay for it. The date will be set when the order is received.

Exposed methods and variables

manager : address of the system manager

addOrder : called by the manager to add a new order

parameter nametypedetails
_orderIdintegerthe unique identifier of the order
_customerethereum addressthe address of the customer

addItemToOrder : allows the manager to add items to the order

parameter nametypedetails
_orderIdintegerthe unique identifier of the order
_itemIdintegerthe id of the item

orderCompleted : marks the order as completed once all the items were added

parameter nametypedetails
_orderIdintegerthe unique identifier of the order

setOrderPrice : called by the manager to set the price of the completed order

parameter nametypedetails
_orderIdintegerthe unique identifier of the order
_priceintegerthe price of the order

orderSent : manager marks the order as sent

parameter nametypedetails
_orderIdintegerthe unique identifier of the order

orderReceived : customer marks the order as delivered

parameter nametypedetails
_orderIdintegerthe unique identifier of the order

payOrder : allows the customer to pay for the order

parameter nametypedetails
_orderIdintegerthe unique identifier of the order

getOrderDetails : shows the address of the customer, the number of items from the order, the price and the delivery timestamp

parameter nametypedetails
_deadlineintegertime to do the task

transferOrderMoney : allows the manager to transfer the money paid for an order to his account

parameter nametypedetails
_idintegerthe unique id of the album

getBalance : returns the total sum of money available in the contract's balance

Reviewed by Modex
Buy

Copyright © Modex Marketplace