FORTEZA ARCHITECTURE Microservices In-Depth Database ERD Schemas

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 NameTypeConstraints & Description
PKpropertyIdUUIDPRIMARY KEY (Default: gen_random_uuid())
FKinccAccountIdVARCHAR(10)4-digit Hexadecimal CSID (e.g., '1001') mapped to INCC
propertyNameVARCHAR(150)NOT NULL (e.g., 'Shirke Mhada Building No. 5')
propertyDetailsTEXTComprehensive structural & premise overview notes
sortCodeVARCHAR(30)Indexing and dispatcher sort key
regNoVARCHAR(60)Municipal Fire & Safety Registration No (e.g., 'MH-CFO-501')
addressLine1VARCHAR(120)NOT NULL, Building number, sector, or wing
addressLine2VARCHAR(120)Plot No., CTS Survey number
streetVARCHAR(100)Street or road name
landmarkVARCHAR(120)Navigation visual reference (e.g., 'Opposite Sion Colony')
city, state, zipCodeVARCHAR(50), (30), (15)City, Province/State, Postal Code
latitude, longitudeDECIMAL(10, 7)Precise GPS coordinates for CAD mapping & dispatch
mapLinkVARCHAR(255)Google Maps / GIS direct link
timeZoneVARCHAR(40)Timezone identifier (e.g., 'Asia/Kolkata', 'America/New_York')
timeZoneDiffFromGMTDECIMAL(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, websiteVARCHAR(100)Official email & website
FKpropertyTypeIdUUIDREFERENCES property_types(id)
ownerVARCHAR(100)Legal premise owner or society management entity
authorizedContactVARCHAR(100)Designated authority name (e.g., 'Rajesh Sharma - Secretary')
passwordVARCHAR(60)Verbal password for telephone verification (e.g., 'FALCON')
duressVARCHAR(60)Covert duress code (alerts police quietly under hostage)
statusENUM'ACTIVE', 'INACTIVE', 'PENDING_INSTALL', 'TEST_MODE'
FKtownCodeIdVARCHAR(20)REFERENCES town_codes(code)
createdAt, updatedAtTIMESTAMPDEFAULT 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 NameTypeConstraints
PKidUUIDPRIMARY KEY
nameVARCHAR(60)Commercial, Residential, Industrial, Institutional
sortCodeVARCHAR(20)Index sort order
descriptionTEXTCategory description
statusVARCHAR(20)'ACTIVE', 'INACTIVE'
Relations: Referenced by properties.propertyTypeId
๐Ÿ“Ÿ property_panels Hardware Hub
Column NameTypeConstraints
PKpanelIdUUIDPRIMARY KEY
FKpropertyIdUUIDREFERENCES properties(propertyId)
inccZoneCodeVARCHAR(20)Zone identifier mapped in INCC stream
masterZoneCodeVARCHAR(20)Parent zone code if chained panel
isMasterBOOLEANDEFAULT TRUE (Primary premise panel)
nameVARCHAR(80)e.g., 'Main Fire Panel Tower A'
descriptionVARCHAR(150)Hardware specs, model info
receiverVARCHAR(10)INCC Receiver Card Number (e.g., '1')
lineVARCHAR(10)Inbound Line Channel (e.g., '1')
portINTTCP Port on Receiver (e.g., 6051)
FKpannelConnectIdUUIDREFERENCES panel_connections(id)
phoneVARCHAR(25)Direct panel telephone / DCU dialer
altPhone1, altPhone2VARCHAR(25)Backup communicator line numbers
Relations: N:1 with properties, N:1 with panel_connections
๐Ÿ”Œ panel_connections Catalog
Column NameTypeConstraints
PKidUUIDPRIMARY KEY
nameVARCHAR(60)IP/Ethernet, AES Mesh Radio, Cellular LTE
sortCodeVARCHAR(20)Display priority
statusVARCHAR(20)'ACTIVE', 'INACTIVE'
๐Ÿ›๏ธ town_codes Municipal Authority
Column NameTypeConstraints
PKcodeVARCHAR(20)PRIMARY KEY (e.g., 'MH_DHA', 'NYC_MN1')
nameVARCHAR(100)Municipality / Authority Name
descriptionTEXTJurisdiction area description
noteTEXTDispatcher navigation & permit rules
address, city, state, zipcodeVARCHARAuthority headquarters address
Relations: 1:N with departments (PD, FD, MD)
๐Ÿš“ departments (PD, FD, MD) PSAP First Responders
Column NameTypeConstraints
PKidUUIDPRIMARY KEY
FKtownCodeVARCHAR(20)REFERENCES town_codes(code)
nameVARCHAR(100)e.g., 'Dharavi Fire Station No. 4'
typeENUM'PD' (Police), 'FD' (Fire), 'MD' (Medical)
addressVARCHAR(150)Physical station address
latitude, longitudeDECIMAL(10,7)Station location coordinates
dispatchPhoneVARCHAR(25)Direct 24/7 emergency dispatch line
canclePhoneVARCHAR(25)Direct line to recall/cancel dispatch
phone, email, whatsAppVARCHARRoutine station communication channels
otherContactInfoTEXTAfter-hours officer desk contacts
description, note, commentTEXTSpecial arrival instructions & siren alerts
statusVARCHAR(20)'ACTIVE', 'INACTIVE'
Relations: Referenced by dispatcher Action Plans when calling Police, Fire, or Ambulance.
๐Ÿ”” alarm_groups Grouping & Routing
Column NameTypeConstraints
PKidUUIDPRIMARY KEY
nameVARCHAR(60)e.g., 'Commercial High-Rise', 'Retail Chain'
descriptionTEXTBatch handling instructions
dispatchPriorityOffsetINTPriority adjustment (+1 for VIP premises)
statusVARCHAR(20)'ACTIVE', 'INACTIVE'
๐Ÿ“ก signal_identifiers (Alarm Codes) Ademco Translation
Column NameTypeConstraints
PKsignalIdVARCHAR(10)e.g., '110', '130', 'E110', 'BA', 'FA'
conditionCodeVARCHAR(20)FIRE, BURGLARY, PANIC, WATERFLOW, TROUBLE
octarCodeENUM'Alarm', 'Cancel', 'Trouble', 'Restoral'
defaultDescriptionVARCHAR(120)e.g., 'Fire Alarm Smoke Detector'
priorityLevelINT1 (Life Safety) to 5 (System Supervisory)
๐Ÿ“ property_attachments Media & Directives
Table NameKey ColumnsDescription
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