đ AssetClassController Documentation
đ QUICK DOCUMENTATIONâ
- File Path: /API/Controllers/AssetClassController.cs
- Primary Purpose: Manages asset classes and their relationships with jobs, providing lookups and filtering options.
- Key Endpoints:
- đ GET /ListByJob - Retrieves asset classes for a specific job
- đ GET /ListWithNoJobs - Gets asset classes not assigned to any job
- đ GET /JobByAssetClassId - Retrieves job information by asset class ID
- Related Models: DropDownDto, JobDto
- Used By:
- Job setup and configuration screens
- Asset hierarchy management
- Asset classification system
đī¸ DETAILED DOCUMENTATIONâ
đī¸ Overviewâ
The AssetClassController handles the management of asset classes, which are a fundamental part of the asset hierarchy in Asset Valuer Pro. Asset classes define the highest level of categorization for assets (e.g., Buildings, Infrastructure, Land) and are associated with valuation jobs. This controller enables retrieving asset classes in different contexts, particularly in relation to jobs.
đ§ Controller Dependenciesâ
- Namespace: AVP.API.Controllers
- Services Used:
- Mediator (CQRS pattern implementation)
- Other Dependencies: None specified
đ Endpointsâ
đ List Asset Classes By Jobâ
- HTTP Method: GET
- URL Pattern: /ListByJob
- Authentication: đ Required (inherited from ApiController)
- Description: Retrieves a list of asset classes associated with a specific job
Request Parametersâ
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | GetAssetClassListQuery | Yes | Contains JobId to filter asset classes |
Response Formatâ
[
{
"id": 1,
"name": "Buildings"
},
{
"id": 2,
"name": "Infrastructure"
},
{
"id": 3,
"name": "Land"
}
]
đ List Asset Classes With No Jobsâ
- HTTP Method: GET
- URL Pattern: /ListWithNoJobs
- Authentication: đ Required
- Description: Retrieves asset classes that are not associated with any jobs
Request Parametersâ
None
Response Formatâ
[
{
"id": 4,
"name": "Furniture & Fittings"
},
{
"id": 5,
"name": "Plant & Equipment"
}
]
đ Get Job By Asset Class IDâ
- HTTP Method: GET
- URL Pattern: /JobByAssetClassId
- Authentication: đ Required
- Description: Retrieves job information based on asset class ID
Request Parametersâ
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | GetJobByAssetClassIdQuery | Yes | Contains AssetClassId to find associated job |
Response Formatâ
{
"id": 123,
"name": "Example Job",
"clientId": 456,
"status": "Open",
"effectiveDate": "2025-01-15T00:00:00Z",
"description": "Annual valuation for Client X",
"assetClassIds": [1, 2, 3]
}
đ Business Contextâ
Asset classes form the foundation of the valuation methodology in APV:
- Different asset classes may require different valuation approaches (cost, market, income)
- Asset classes determine which valuation profiles apply to which assets
- Financial reporting requires aggregation of valuation results by asset class
- Asset classes are essential for structuring the data imported from client systems
đ Relationshipsâ
âšī¸ Note: Asset classes are central to the asset hierarchy:
- An asset class contains multiple asset types
- Asset types contain multiple asset subtypes
- This hierarchy allows for granular control of valuation parameters at each level