コード例 #1
0
 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
コード例 #2
0
 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})
     ]
コード例 #3
0
 def get_all(cls, company_id):
     # get all departments of the company
     departments = Database.find(departmentConstant.COLLECTION,
                                 {'company_id': company_id})
     return departments
コード例 #4
0
 def all(cls, company_id):
     return [
         cls(**elem) for elem in Database.find(
             departmentConstant.COLLECTION, {"company_id": company_id})
     ]
コード例 #5
0
 def all_bills_for_manager_filter(cls, manager_id, filter_type):
     return Database.find(billConstant.COLLECTION, {
         'manager_id': manager_id,
         'status': filter_type
     })
コード例 #6
0
 def all_bills(cls, department_id, status):
     return Database.find(billConstant.COLLECTION, {
         'department_id': department_id,
         'status': status
     })
コード例 #7
0
 def all_bills_for_employee_filter(cls, employee_id, filter_type):
     return Database.find(billConstant.COLLECTION, {
         'employee_id': employee_id,
         'status': filter_type
     })
コード例 #8
0
 def all_bills_for_manager(cls, manager_id):
     return Database.find(billConstant.COLLECTION,
                          {'manager_id': manager_id})
コード例 #9
0
 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})
コード例 #10
0
 def all_bills_for_employee(cls, employee_id):
     return Database.find(billConstant.COLLECTION,
                          {'employee_id': employee_id})
コード例 #11
0
 def all(cls):
     # to get all employees
     return [cls(**elem) for elem in Database.find(employeeConstants.COLLECTION, {})]
コード例 #12
0
 def get_by_department_id(cls, department_id):
     # to get employees of particular department
     return Database.find(employeeConstants.COLLECTION, {'department_id': department_id})
コード例 #13
0
 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
コード例 #14
0
 def all(cls):
     # to get all managers
     return [
         cls(**elem)
         for elem in Database.find(managerConstants.COLLECTION, {})
     ]
コード例 #15
0
 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})