Audience: Engineers, DBAs. What this answers: how the catalog, allocation, release, and status axes are built.
Source:
AssetService.cs(1,069 lines),AdminAssetsService.cs(681),Employee/AssetsService.cs(68), theAsset/EmployeeAssetentity graph (TenantDb),AssetModel.cs, andweb-app/src/pages/dashboard/documents/assets/*. Verified 2026-07-20.
CompanyId)AssetType (AssetTypeId, Description)
└─< AssetSubType (AssetSubTypeId, AssetTypeId, Description)
└─< Asset (AssetId, Alias, Identifier, Barcode, AssetSubTypeId,
AssetStatusId, IsMultipleAssignable, MaxAssignment,
AssignmentCount, CommissionDate, DecommissionDate, CompanyId)
├─ AssetStatus (AssetStatusId, Description) // Active/Inactive
└─< EmployeeAsset (EmployeeAssetId, AssetId, PersonId,
EmployeeAssetStatusId, AssignmentDate, ReleaseDate,
AutoReleaseDate, AssignmentIntervalId, AssignmentPeriod, Note)
├─ EmployeeAssetStatus (Assigned/Released)
├─ Person (the employee)
└─ Interval (AssignmentInterval — Days/Months/…)
Read models: ViewAsset, ViewAssetSubType, ViewEmployeeAsset — denormalised views for list screens (carry names, not just ids).
| Axis | Enum (AssetModel.cs) |
Values | On |
|---|---|---|---|
| Item status | AssetStatuParams |
Active=1, Inactive=2 |
Asset.AssetStatusId |
| Allocation status | EmployeeAssetStatuParams |
Assigned=1, Released=2 |
EmployeeAsset.EmployeeAssetStatusId |
Both are backed by configurable tables (AssetStatus, EmployeeAssetStatus — id + description), but the constants above are the ones the code branches on. Never assume a query filtering "available" items means one axis — check both (Asset Active and no live Assigned allocation, or seats free).
AssetService.CreateEmployeeAsset / AdminAssetsService.AddEmployee_Asset)Creating an EmployeeAsset:
AssignmentDate = parse(x.assignment_date, "dd/MM/yyyy") ?? Now.Date
AssignmentPeriod = int?(x.assignment_period) // the count, e.g. 6
AssignmentIntervalId = int?(x.assignment_interval_id) // the unit → Interval (Months)
EmployeeAssetStatusId = Assigned (1)
IsMultipleAssignable asset, the service checks AssignmentCount against MaxAssignment before adding (CheckEmployeeAsset / GetEmployeeAssetActiveCountByPersonId) and blocks over-assignment. Single-assignment items are blocked if already assigned.GetEmployeeAssetDuplicate prevents assigning the same item to the same person twice while live.ReleaseEmployeeAsset / ReleaseEmployeeAssets)EmployeeAssetStatusId = Released (2) and stamps ReleaseDate.Release_Assets (plural) releases a batch — e.g. everything held by one person (offboarding).Auto-release: AutoReleaseDate exists on the entity and is surfaced in read models, but — see RFD-002 — no scheduled job / worker was found that flips assignments to Released when that date passes. Treat auto-release as not implemented; release is manual.