Employe Contract ADR - globe-and-citizen/cnc-portal GitHub Wiki

Employee

Description of employee smart contract and user stories

Employe contract is a contract that allow a company to hire an employee and pay him in token. The employe contract is responsible of the following:

  • Track the employe data and history
  • Employe Data: see the data structure

Data structure

  • Employee
    • Offer
      • Status: Status
      • Salary
        • Hourly rate
        • Number of hour in a week
        • Total Weekly salary: Can be a getter : hourly rate * number of hour
        • Signin bonus: The amount of token that the employee receive when he sign the contract.
      • Start date: Should be always a monday
      • End date
    • Last claim date : Not sure

ADR

Employee Process

  • Owner create offer
  • Employee accept offer
  • Employee Can resign
  • Owner Can fire employee
  • An employee can claim his salary after the end of the week
  • An employee can see his pending salary
  • Owner can see all pending salary
  • Owner can see all employee and their status/data
  • Owner/Employe can see all the transaction his

Employe work is for at least a week. The week start on monday 00:00 and end on sunday 23:59

For one week of work we have:

  • Wage per hour
  • Number of hour worked in a week
  • Total pay for the week

The employe can claim his pay at the end of the week: after Monday 23:59 The employe can show his pending pay at any time. The company can show all his pending pay for all employee at any time.

Additional feature: Escrow: The company put the salary in an escrow, and the employee can claim the salary from the escrow. Every Week the owner or a con Job will update the balance of every employe in the escrow. Advantage:

  • The escrow can be use as a security buffer for the company.
  • The employe don't have a direct acces to the bank account of the company.
  • And the employe have the garantie that he can claim his salary at any time.

User stories

As a owner i want to create an employee contract for my Team CNC As an owner i want to create an employement offer As an employee i want to accept an employement offer As an employee i want to resign an ongoing employement As an owner i want to fire an employee for an ongoing employement

As a owner i want to hire an employee Then i create a job offer Then the employee is added to the team PS: for the momement we can skip the job offer and go directly to the hiring process in the Smart contract. That mean, when the owner create the offer, no need for the employee to accept the offer. He is directly added to the team.

As a employee i want to withdraw my payement pending Then i can withdraw my payement pending Then the fund move from the company bank account to my wallet