Esempio n. 1
0
 def create_simple(cls, name, password, email):
     employee = Employee()
     employee.name = name
     employee.email = email
     employee.password = password
     employee.activated = False
     employee.is_admin = False
     return employee
Esempio n. 2
0
 def register(cls,
              employee: Employee,
              employment_date: datetime,
              balance_vac=0):
     employee.acceptance_date = datetime.now()
     employee.employment_date = employment_date
     employee.activated = True
     employee.vacation = balance_vac
     return employee
Esempio n. 3
0
 def deactivate(cls, employee: Employee):
     employee.activated = False
     return employee
Esempio n. 4
0
 def activate(cls, employee: Employee):
     employee.activated = True
     return employee