Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Version: 1.0.0
Last Updated: 2026-01-11
Module: Facilities Management
Prefix: fm_
Tables: 22

Changelog

  • 1.0.0 (2026-01-11): Initial ERD documentation

Overview

The Facilities Management module handles asset tracking, preventive maintenance scheduling, work order management, and inventory control for physical facilities.

Assets ERD

Work Orders ERD

Preventive Maintenance ERD

Inventory ERD

Vendors ERD

RLS Policy Coverage

TableSELECTINSERTUPDATEDELETEWITH CHECKStatus
fm_assetsComplete
fm_asset_categoriesComplete
fm_asset_maintenance_history---History table
fm_work_ordersComplete
fm_work_order_history---History table
fm_pm_schedulesComplete
fm_inventory_itemsComplete
fm_inventory_transactions---Transaction log
fm_vendorsComplete

Key Tables

fm_assets

Physical assets with lifecycle tracking, specifications, and warranty info.

fm_work_orders

Maintenance and repair work orders with task tracking.

fm_pm_schedules

Preventive maintenance schedules generating recurring work orders.

fm_inventory_items

Spare parts and supplies inventory with reorder management.

Helper Functions

FunctionPurpose
fm_has_org_access(org_id, user_id)Check FM module access
fm_get_overdue_pm(org_id)Get overdue PM schedules
fm_get_low_inventory(org_id)Get items below reorder point
fm_calculate_asset_depreciation(asset_id)Calculate current value

Cross-Module Dependencies

  • PF: Organizations, sites, profiles
  • FA: Asset depreciation, expense tracking
  • HR: Work order assignments, technician tracking