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
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
def deactivate(cls, employee: Employee): employee.activated = False return employee
def activate(cls, employee: Employee): employee.activated = True return employee