//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f. pragma solidity ^0.4.18; contract BonusScheme { address public buyer /* The employee is the buyer */ address public owner /* The company is the owner */ struct Employee { address emp_addr string emp_id string emp_name } Struct Partner { address parner_addr string partner_id string partner_name } struct Order { address employee address partner address item unit quantity unit price unit date } struct Invoice { unit orderno; } /// A mapping to store orders mapping (unit => Order) orders; /// A mapping to store invoices mapping (unit => Invoice) invoices; /// A mapping to store partners mapping (unit => Partner) partners; /// Event triggered for every new employee account set up on the bonus scheme event SetUpEmployeeAccount(address employee, string name) /// Event triggered for every new order event OrderPlaced(address employee, string item, uint quantity, uint orderno); /// Event triggered when the company sends the invoice to employee event InvoiceSent(address employee, uint invoiceno, uint orderno, uint address partner); /// Constructor function BonusScheme(address _emp_addr) { /* The company is the contact’s owner */ owner = msg.sender; buyer = _emp_addr; } function payEmployee(address employee, unit quantity) public payable onlyManager isEmployee returns(bool){ } function placeOrder(address employee, address item, unit quantity) public payable onlyManager isEmployee returns(bool){ } function accept() public payable onlyManager isEmployee returns(bool){ } function reject() public payable onlyManager isEmployee returns(bool){ } function sendInvoice(address employee, unit quantity) public payable onlyManager isEmployee returns(bool){ } }
0.4.18