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 update_with(cls, employee: Employee, name=None, password=None, email=None, employment_date: datetime = None): employee.employment_date = employment_date if employment_date else employee.employment_date employee.password = password if password else employee.password employee.email = email if email else employee.email employee.name = name if name else employee.name return employee