def all_bills_type_by_department_id(cls, department_id): # get all bill-types of particular department billtypes = Database.find(billTypeConstant.COLLECTION, {'department_id': department_id}) return billtypes
def all(cls, department_id): # get all bill-types from department return [ cls(**elem) for elem in Database.find( billTypeConstant.COLLECTION, {'department_id': department_id}) ]
def get_all(cls, company_id): # get all departments of the company departments = Database.find(departmentConstant.COLLECTION, {'company_id': company_id}) return departments
def all(cls, company_id): return [ cls(**elem) for elem in Database.find( departmentConstant.COLLECTION, {"company_id": company_id}) ]
def all_bills_for_manager_filter(cls, manager_id, filter_type): return Database.find(billConstant.COLLECTION, { 'manager_id': manager_id, 'status': filter_type })
def all_bills(cls, department_id, status): return Database.find(billConstant.COLLECTION, { 'department_id': department_id, 'status': status })
def all_bills_for_employee_filter(cls, employee_id, filter_type): return Database.find(billConstant.COLLECTION, { 'employee_id': employee_id, 'status': filter_type })
def all_bills_for_manager(cls, manager_id): return Database.find(billConstant.COLLECTION, {'manager_id': manager_id})
def get_by_id(cls, company_id): # given the company ID, it returns the employee details of that company return Database.find(employeeConstants.COLLECTION,{"company_id":company_id})
def all_bills_for_employee(cls, employee_id): return Database.find(billConstant.COLLECTION, {'employee_id': employee_id})
def all(cls): # to get all employees return [cls(**elem) for elem in Database.find(employeeConstants.COLLECTION, {})]
def get_by_department_id(cls, department_id): # to get employees of particular department return Database.find(employeeConstants.COLLECTION, {'department_id': department_id})
def get_by_department_id(cls, department_id): # to get managers of particular department managers = Database.find(managerConstants.COLLECTION, {'department_id': department_id}) return managers
def all(cls): # to get all managers return [ cls(**elem) for elem in Database.find(managerConstants.COLLECTION, {}) ]
def get_by_id(cls, company_id): # given the company ID, it returns the manager details of that company return Database.find(managerConstants.COLLECTION, {'company_id': company_id})