1. Property Service (Central Master Registry)
Implements your exact schema specification: Property, propertyTypes, Property Panels, PannelConnections, TownCode, department (PD/FD/MD), Alarm Group, and Signal Identifier. Single source of truth shared by both Monitoring CAD and SaaS Audit.
Database: PostgreSQL 16 + PostGIS
๐ข properties (Master Premise Table)
Core Entity
| Column Name | Type | Constraints & Description |
|---|---|---|
| PKpropertyId | UUID | PRIMARY KEY (Default: gen_random_uuid()) |
| FKinccAccountId | VARCHAR(10) | 4-digit Hexadecimal CSID (e.g., '1001') mapped to INCC |
| propertyName | VARCHAR(150) | NOT NULL (e.g., 'Shirke Mhada Building No. 5') |
| propertyDetails | TEXT | Comprehensive structural & premise overview notes |
| sortCode | VARCHAR(30) | Indexing and dispatcher sort key |
| regNo | VARCHAR(60) | Municipal Fire & Safety Registration No (e.g., 'MH-CFO-501') |
| addressLine1 | VARCHAR(120) | NOT NULL, Building number, sector, or wing |
| addressLine2 | VARCHAR(120) | Plot No., CTS Survey number |
| street | VARCHAR(100) | Street or road name |
| landmark | VARCHAR(120) | Navigation visual reference (e.g., 'Opposite Sion Colony') |
| city, state, zipCode | VARCHAR(50), (30), (15) | City, Province/State, Postal Code |
| latitude, longitude | DECIMAL(10, 7) | Precise GPS coordinates for CAD mapping & dispatch |
| mapLink | VARCHAR(255) | Google Maps / GIS direct link |
| timeZone | VARCHAR(40) | Timezone identifier (e.g., 'Asia/Kolkata', 'America/New_York') |
| timeZoneDiffFromGMT | DECIMAL(3, 1) | GMT offset hours (e.g., +5.5, -5.0) |
| primaryContactNumbers | JSONB |
Primary emergency contact with delivery channels:
{ "number": "+919820012345", "sms": true, "phone": true, "whatsapp": true }
|
| firstAltContactNumbers | JSONB |
First alternate contact:
{ "number": "+919820155667", "sms": true, "phone": true, "whatsapp": false }
|
| secondAltContactNumbers | JSONB |
Second alternate contact:
{ "number": "02224019988", "sms": false, "phone": true, "whatsapp": false }
|
| email, website | VARCHAR(100) | Official email & website |
| FKpropertyTypeId | UUID | REFERENCES property_types(id) |
| owner | VARCHAR(100) | Legal premise owner or society management entity |
| authorizedContact | VARCHAR(100) | Designated authority name (e.g., 'Rajesh Sharma - Secretary') |
| password | VARCHAR(60) | Verbal password for telephone verification (e.g., 'FALCON') |
| duress | VARCHAR(60) | Covert duress code (alerts police quietly under hostage) |
| status | ENUM | 'ACTIVE', 'INACTIVE', 'PENDING_INSTALL', 'TEST_MODE' |
| FKtownCodeId | VARCHAR(20) | REFERENCES town_codes(code) |
| createdAt, updatedAt | TIMESTAMP | DEFAULT CURRENT_TIMESTAMP |
Relationships: 1:N with property_panels, 1:N with property_documents, 1:N with floor_plans, 1:N with temp_notes, N:1 with town_codes
๐ท๏ธ property_types
Catalog
| Column Name | Type | Constraints |
|---|---|---|
| PKid | UUID | PRIMARY KEY |
| name | VARCHAR(60) | Commercial, Residential, Industrial, Institutional |
| sortCode | VARCHAR(20) | Index sort order |
| description | TEXT | Category description |
| status | VARCHAR(20) | 'ACTIVE', 'INACTIVE' |
Relations: Referenced by properties.propertyTypeId
๐ property_panels
Hardware Hub
| Column Name | Type | Constraints |
|---|---|---|
| PKpanelId | UUID | PRIMARY KEY |
| FKpropertyId | UUID | REFERENCES properties(propertyId) |
| inccZoneCode | VARCHAR(20) | Zone identifier mapped in INCC stream |
| masterZoneCode | VARCHAR(20) | Parent zone code if chained panel |
| isMaster | BOOLEAN | DEFAULT TRUE (Primary premise panel) |
| name | VARCHAR(80) | e.g., 'Main Fire Panel Tower A' |
| description | VARCHAR(150) | Hardware specs, model info |
| receiver | VARCHAR(10) | INCC Receiver Card Number (e.g., '1') |
| line | VARCHAR(10) | Inbound Line Channel (e.g., '1') |
| port | INT | TCP Port on Receiver (e.g., 6051) |
| FKpannelConnectId | UUID | REFERENCES panel_connections(id) |
| phone | VARCHAR(25) | Direct panel telephone / DCU dialer |
| altPhone1, altPhone2 | VARCHAR(25) | Backup communicator line numbers |
Relations: N:1 with properties, N:1 with panel_connections
๐ panel_connections
Catalog
| Column Name | Type | Constraints |
|---|---|---|
| PKid | UUID | PRIMARY KEY |
| name | VARCHAR(60) | IP/Ethernet, AES Mesh Radio, Cellular LTE |
| sortCode | VARCHAR(20) | Display priority |
| status | VARCHAR(20) | 'ACTIVE', 'INACTIVE' |
๐๏ธ town_codes
Municipal Authority
| Column Name | Type | Constraints |
|---|---|---|
| PKcode | VARCHAR(20) | PRIMARY KEY (e.g., 'MH_DHA', 'NYC_MN1') |
| name | VARCHAR(100) | Municipality / Authority Name |
| description | TEXT | Jurisdiction area description |
| note | TEXT | Dispatcher navigation & permit rules |
| address, city, state, zipcode | VARCHAR | Authority headquarters address |
Relations: 1:N with departments (PD, FD, MD)
๐ departments (PD, FD, MD)
PSAP First Responders
| Column Name | Type | Constraints |
|---|---|---|
| PKid | UUID | PRIMARY KEY |
| FKtownCode | VARCHAR(20) | REFERENCES town_codes(code) |
| name | VARCHAR(100) | e.g., 'Dharavi Fire Station No. 4' |
| type | ENUM | 'PD' (Police), 'FD' (Fire), 'MD' (Medical) |
| address | VARCHAR(150) | Physical station address |
| latitude, longitude | DECIMAL(10,7) | Station location coordinates |
| dispatchPhone | VARCHAR(25) | Direct 24/7 emergency dispatch line |
| canclePhone | VARCHAR(25) | Direct line to recall/cancel dispatch |
| phone, email, whatsApp | VARCHAR | Routine station communication channels |
| otherContactInfo | TEXT | After-hours officer desk contacts |
| description, note, comment | TEXT | Special arrival instructions & siren alerts |
| status | VARCHAR(20) | 'ACTIVE', 'INACTIVE' |
Relations: Referenced by dispatcher Action Plans when calling Police, Fire, or Ambulance.
๐ alarm_groups
Grouping & Routing
| Column Name | Type | Constraints |
|---|---|---|
| PKid | UUID | PRIMARY KEY |
| name | VARCHAR(60) | e.g., 'Commercial High-Rise', 'Retail Chain' |
| description | TEXT | Batch handling instructions |
| dispatchPriorityOffset | INT | Priority adjustment (+1 for VIP premises) |
| status | VARCHAR(20) | 'ACTIVE', 'INACTIVE' |
๐ก signal_identifiers (Alarm Codes)
Ademco Translation
| Column Name | Type | Constraints |
|---|---|---|
| PKsignalId | VARCHAR(10) | e.g., '110', '130', 'E110', 'BA', 'FA' |
| conditionCode | VARCHAR(20) | FIRE, BURGLARY, PANIC, WATERFLOW, TROUBLE |
| octarCode | ENUM | 'Alarm', 'Cancel', 'Trouble', 'Restoral' |
| defaultDescription | VARCHAR(120) | e.g., 'Fire Alarm Smoke Detector' |
| priorityLevel | INT | 1 (Life Safety) to 5 (System Supervisory) |
๐ property_attachments
Media & Directives
| Table Name | Key Columns | Description |
|---|---|---|
| property_documents | id, propertyId, docType, fileUrl | Fire NOC certificates, insurance policies, structural blueprints |
| property_floor_plans | id, propertyId, floorName, svgMapUrl | Architectural floor diagrams with pinpoint sensor SVG overlays |
| property_temp_notes | id, propertyId, noteText, startAt, endAt | Temporary directives (e.g. 'Cleaning staff on site 10pm-3am') |
| property_call_orders | id, propertyId, sequenceOrder, contactJson | Sequence of people to call during active emergencies |