@companyio/assets
v0.1.1
Published
Reusable operational asset / machinery register with opaque project assignment.
Readme
@companyio/assets
Operational asset / machinery register with opaque project assignment history.
Operational register only — not a fixed-asset ledger. CapEx journals are posted by Purchasing (debitAccountId = chart 1500). This package may store opaque purchaseBillId / acquisitionCost links.
Owns
- Tenant asset CRUD (
AssetsAsset), including optional CapEx acquisition fields - Append-only assignments (
AssetsAssignment) with opaqueprojectId - At most one
ACTIVEassignment per asset - Idempotent create when the same
(purchaseBillId, purchaseBillLineId|null)is submitted again
Does not own
- Project membership / site roles (host or vertical — use contractor routes for assign)
- Depreciation, utilization, or CapEx journal posting
HTTP
Default prefix: /api/v1/assets
Host wiring
- Add fragment to assemble-schema
- Host migrate from
prisma/migrations/0001_assets_baseline attachAssets(app, { store, authenticate, getContext })
