-
Notifications
You must be signed in to change notification settings - Fork 10
/
LandTransport.sol
34 lines (22 loc) · 968 Bytes
/
LandTransport.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
pragma solidity 0.4.24;
import "./Manager.sol";
contract LandTransport is main {
event OrderLoaded(uint _orderId); // Defined Events.
event OrderInTranssit(uint _orderId);
event OrderUnloaded(uint _orderId);
function orderLoaded(uint _orderId){
require(msg.sender==flowOfObject[_orderId].Addresses[currentaddress[_orderId]]);
statsMap[_orderId].checkPoint="OrderLoadedByLandTransport"; // Updates currentStatusOfOrder.
statsMap[_orderId].timeTheEventCalled=now;
OrderLoaded(_orderId); // Event OrderLoaded.
}
function stateRequiredTimeToNextEntity(uint _orderId, uint _requiredTime){ // Give Estimate;
statsMap[_orderId].timeToNextEntity = _requiredTime;
}
function orderUnloaded(uint _orderId){
statsMap[_orderId].checkPoint="OrderUnloadedByLandTransport"; // Updates currentStatusOfOrder.
statsMap[_orderId].timeTheEventCalled=now;
OrderUnloaded(_orderId);
transferPossesion(_orderId);
}
}