火災警報檢查應用程式後端範本
檢查日誌、電池追蹤及消防隊報告
一個在 Back4app 上準備生產的 火災警報檢查後端,包含煙霧探測器日誌、電池日期和消防隊報告。包括 ER 圖、數據字典、JSON 架構、API 遊戲場,以及一個 AI 代理 提示以快速啟動。
主要重點
此模板為您提供了一個具有偵測器日誌、電池日期和消防官報告的火警檢查後端,使經理和現場團隊能夠保持檢查的有序。
- 更智能的偵測器追蹤 — 在可查詢的 Parse 類別中,為每個煙霧偵測器建模,包括序列號、位置和檢查歷史。
- 電池日期可見性 — 儲存電池更換日期和下次到期值,以便於查找過期單位。
- 已準備好供消防官使用的報告 — 使用 MarshalReport 記錄為檢查員和消防官審查生成清晰的摘要。
- 檢查責任 — 將每次檢查與一棟建築和技術人員綁定,以便現場工作保持可追蹤。
- 跨平台檢查應用程序後端 — 通過一個 REST 和 GraphQL API 為建築、探測器和報告提供移動和網頁客戶端服務。
火災報警檢查應用後端概覽
順利的火災報警檢查日與混亂的一天之間的差異通常在於可見性:誰被指派、什麼被 Bloc,以及什麼在等待零件。可靠性是一個特性,而不是註腳。該架構以建築、檢查、煙霧探測器、電池和 MarshalReport 為中心,並對 Back4app 進行實時查詢,為火災報警檢查操作員提供整個組織可以信任的真相來源。該架構涵蓋建築(名稱、地址、區域、聯繫人)、檢查(建築、檢查員、檢查日期、狀態)、煙霧探測器(建築、房間、探測器 ID、狀況、電池日期)、電池(探測器、更換日期、下次到期日期、備註)和 MarshalReport(檢查、摘要、寄送給、pdfUrl),並內建驗證、日誌和報告。連接您首選的前端,開始更快地記錄檢查。
最佳適合:
火警檢查:後端快照
如果火警檢查的相關人員無法在幾秒鐘內回答簡單問題,他們將在會議中緩慢且昂貴地回答這些問題。
中心保持建築、檢查和煙霧探測器的語言一致,以便產品、運營和工程在說「記錄」時意味著相同的東西。
核心火災報警檢查功能
此中心中的每個技術卡片使用相同的火災警報檢查模式,包括建築、檢查、煙霧探測器、電池和消防報告。
建築物登記
建築類別存儲名稱、地址、區域和聯絡人。
檢查排程和狀態
檢查類別連結建築物、檢查員、檢查日期及狀態。
煙霧探測器日誌
SmokeDetector 類別儲存 detectorId、房間、狀況和電池日期。
電池更換日期
Battery 類別跟蹤 replacedOn、nextDueOn 和備註。
消防監察員報告
MarshalReport 類別儲存檢查、摘要、發送對象和 pdfUrl。
為什麼使用 Back4app 建立您的火災報警檢查應用程序後端?
Back4app 為您提供建築、探測器、電池和報告的基本功能,讓您的團隊能專注於檢查工作,而不是後端開發。
- •檢查和資產追蹤: 建築和檢查類別保持現場詳細資訊、區域和檢查狀態的聯繫。
- •探測器日誌和電池日期: 像 detectorId、condition、replacedOn 和 nextDueOn 的 SmokeDetector 和 Battery 字段使維護歷史易於查詢。
- •實時 + API 靈活性: 在保持 REST 和 GraphQL 可用於現場應用程序和儀表板的同時,使用 Live Queries 進行檢查更新。
快速構建和更新火災報警檢查工作流程,所有平台只需一個後端合約。
核心優勢
一個火災警報檢查後端,幫助您的團隊從紙質清單過渡到結構化的檢查記錄。
更快的檢查推廣
從完整的建築、檢查和煙霧探測器模式開始,而不是自行草擬模型。
清晰的電池跟進
儲存 Battery.replacedOn 和 Battery.nextDueOn,以便逾期的單位在檢查缺失之前顯示出來。
報告準備好的記錄
MarshalReport 將檢查摘要和 PDF 鏈接存放在一起,便於移交和審核。
可追蹤的現場工作
將每次檢查鏈接到建築物和檢查員,以便您可以審核誰檢查了哪個現場。
可查詢的探測器歷史
保持 SmokeDetector.condition 和 SmokeDetector.batteryDate 可供搜索和過濾。
人工智慧啟動工作流程
使用一個結構化提示快速生成後端支架和集成指導。
準備好啟動您的消防警報檢查應用程序了嗎?
讓 Back4app 人工智慧代理構建您的消防警報檢查後端,並從一個提示中生成探測器日誌、電池日期和匯報。
免費開始 — 每月 50 條 AI 代理提示,無需信用卡
技術堆疊
此火災警報檢查後端模板中包含所有內容。
ER 圖
消防警報檢查後端架構的實體關係模型。
涵蓋建築、檢查、煙霧探測器日誌、電池日期和報告的架構。
查看圖表來源
erDiagram
Inspector ||--o{ Site : "manages"
Inspector ||--o{ SmokeDetectorLog : "records"
Inspector ||--o{ BatteryCheck : "performs"
Inspector ||--o{ InspectionReport : "authors"
Inspector ||--o{ MarshalSubmission : "submits"
Site ||--o{ FireAlarmDevice : "hosts"
Site ||--o{ InspectionReport : "has"
FireAlarmDevice ||--o{ SmokeDetectorLog : "logs"
FireAlarmDevice ||--o{ BatteryCheck : "battery checks"
InspectionReport ||--o{ MarshalSubmission : "submitted as"
Inspector {
String objectId PK
String username
String email
String password
String role
Date createdAt
Date updatedAt
}
Site {
String objectId PK
String siteName
String address
String siteCode
String managerId FK
Date createdAt
Date updatedAt
}
FireAlarmDevice {
String objectId PK
String siteId FK
String deviceTag
String deviceType
String zone
String status
Date batteryDueOn
Date createdAt
Date updatedAt
}
SmokeDetectorLog {
String objectId PK
String deviceId FK
String inspectorId FK
Date logDate
String reading
String notes
Date createdAt
Date updatedAt
}
BatteryCheck {
String objectId PK
String deviceId FK
String inspectorId FK
Date checkedOn
Date batteryExpiryDate
String batteryStatus
Date createdAt
Date updatedAt
}
InspectionReport {
String objectId PK
String siteId FK
String inspectorId FK
Date reportDate
String summary
String findings
String status
Date createdAt
Date updatedAt
}
MarshalSubmission {
String objectId PK
String reportId FK
String submittedById FK
Date submissionDate
String marshalStatus
String referenceNumber
Date createdAt
Date updatedAt
}
檢查整合流程
登錄、查找建築、更新檢查探測器日誌、記錄電池日期和創建報告的典型運行流程。
查看圖表來源
sequenceDiagram
participant User
participant App as Fire Alarm Inspection App
participant Back4app as Back4app Cloud
User->>App: Sign in
App->>Back4app: POST /login
Back4app-->>App: Session token
User->>App: Open site dashboard
App->>Back4app: GET /classes/Site?include=manager
Back4app-->>App: Site list with manager pointers
User->>App: Record smoke detector log
App->>Back4app: POST /classes/SmokeDetectorLog
Back4app-->>App: SmokeDetectorLog objectId
User->>App: Update battery date
App->>Back4app: POST /classes/BatteryCheck
Back4app-->>App: BatteryCheck objectId
User->>App: Submit marshal report
App->>Back4app: POST /classes/MarshalSubmission
Back4app-->>App: MarshalSubmission status資料字典
火警檢查架構中每個類別的完整欄位級別參考。
| 欄位 | 類型 | 描述 | 必填 |
|---|---|---|---|
| objectId | String | Auto-generated unique identifier | 自動 |
| username | String | Inspector login name | |
| String | Inspector email address | ||
| password | String | Hashed password (write-only) | |
| role | String | Role of the user (e.g., manager, coordinator, technician) | |
| createdAt | Date | Auto-generated creation timestamp | 自動 |
| updatedAt | Date | Auto-generated last-update timestamp | 自動 |
7 欄位在 Inspector 中
安全性和權限
ACL 和 CLP 策略如何保護檢查員、建築物、探測器日誌和消防官報告。
檢查員擁有的記錄
只有指定的檢查員或授權的經理應編輯檢查和煙霧探測器記錄。
報告完整性
MarshalReport 項目應從批准的檢查中創建,並受到保護以防隨意編輯。
範圍網站訪問
將建築物和電池的讀取限制為負責該網站、區域或帳戶的團隊。
架構 (JSON)
原始 JSON 架構定義,準備複製到 Back4app 或用作實現參考。
{
"classes": [
{
"className": "Inspector",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"username": {
"type": "String",
"required": true
},
"email": {
"type": "String",
"required": true
},
"password": {
"type": "String",
"required": true
},
"role": {
"type": "String",
"required": true
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "Site",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"siteName": {
"type": "String",
"required": true
},
"address": {
"type": "String",
"required": true
},
"siteCode": {
"type": "String",
"required": true
},
"manager": {
"type": "Pointer",
"required": true,
"targetClass": "Inspector"
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "FireAlarmDevice",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"site": {
"type": "Pointer",
"required": true,
"targetClass": "Site"
},
"deviceTag": {
"type": "String",
"required": true
},
"deviceType": {
"type": "String",
"required": true
},
"zone": {
"type": "String",
"required": true
},
"status": {
"type": "String",
"required": true
},
"batteryDueOn": {
"type": "Date",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "SmokeDetectorLog",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"device": {
"type": "Pointer",
"required": true,
"targetClass": "FireAlarmDevice"
},
"inspector": {
"type": "Pointer",
"required": true,
"targetClass": "Inspector"
},
"logDate": {
"type": "Date",
"required": true
},
"reading": {
"type": "String",
"required": true
},
"notes": {
"type": "String",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "BatteryCheck",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"device": {
"type": "Pointer",
"required": true,
"targetClass": "FireAlarmDevice"
},
"inspector": {
"type": "Pointer",
"required": true,
"targetClass": "Inspector"
},
"checkedOn": {
"type": "Date",
"required": true
},
"batteryExpiryDate": {
"type": "Date",
"required": true
},
"batteryStatus": {
"type": "String",
"required": true
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "InspectionReport",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"site": {
"type": "Pointer",
"required": true,
"targetClass": "Site"
},
"inspector": {
"type": "Pointer",
"required": true,
"targetClass": "Inspector"
},
"reportDate": {
"type": "Date",
"required": true
},
"summary": {
"type": "String",
"required": true
},
"findings": {
"type": "String",
"required": true
},
"status": {
"type": "String",
"required": true
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "MarshalSubmission",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"report": {
"type": "Pointer",
"required": true,
"targetClass": "InspectionReport"
},
"submittedBy": {
"type": "Pointer",
"required": true,
"targetClass": "Inspector"
},
"submissionDate": {
"type": "Date",
"required": true
},
"marshalStatus": {
"type": "String",
"required": true
},
"referenceNumber": {
"type": "String",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
}
]
}與 AI 代理一起構建
使用 Back4app AI 代理從此模板生成實際的火警檢查應用程式,包括前端、後端、授權、建築物、探測器、電池和報告流程。
在 Back4app 上創建一個火警檢查應用程式的後端,使用此確切的架構和行為。 架構: 1. 使用者(使用 Back4app 內建):用戶名、電子郵件、密碼;objectId、createdAt、updatedAt(系統)。 2. 建築物:名稱(字串,必填)、地址(字串,必填)、區域(字串)、聯絡人(字串);objectId、createdAt、updatedAt(系統)。 3. 檢查:建築物(指向建築物的指標,必填)、檢查員(指向使用者的指標,必填)、檢查日期(日期,必填)、狀態(字串,必填)、備註(字串);objectId、createdAt、updatedAt(系統)。 4. 煙霧探測器:建築物(指向建築物的指標,必填)、房間(字串,必填)、探測器 ID(字串,必填)、狀況(字串,必填)、電池日期(日期);objectId、createdAt、updatedAt(系統)。 5. 電池:探測器(指向煙霧探測器的指標,必填)、更換日期(日期,必填)、下一次到期(日期,必填)、備註(字串);objectId、createdAt、updatedAt(系統)。 6. MarshalReport:檢查(指向檢查的指標,必填)、摘要(字串,必填)、發送至(字串)、pdfUrl(字串);objectId、createdAt、updatedAt(系統)。 安全性: - 只有指定的檢查員或授權的經理可以更新檢查記錄。請使用雲代碼進行驗證。 授權: - 註冊、登錄、登出。 行為: - 列出建築物、創建檢查、更新煙霧探測器記錄、記錄電池日期和生成 Marshal 報告。 交付: - Back4app 應用程式與架構、ACL、CLP;建築物、檢查、探測器記錄、電池和報告的前端。
按下下面的按鈕以打開帶有此模板提示的代理。
這是沒有技術後綴的基本提示。您可以在後面調整生成的前端堆棧。
API遊樂場
嘗試對火警檢查架構使用 REST 和 GraphQL 端點。回應使用模擬數據,並不需要 Back4app 帳戶。
使用與此模板相同的架構。
選擇你的技術
展開每個卡片以查看如何將建築、檢查和煙霧探測器與您選擇的堆疊集成。
Flutter 火警檢查後端
React 火警檢查後端
React 原生 火警檢查後端
Next.js 火警檢查後端
JavaScript 火警檢查後端
Android 火警檢查後端
iOS 火警檢查後端
Vue 火警檢查後端
Angular 火警檢查後端
GraphQL 火警檢查後端
REST API 火警檢查後端
PHP 火警檢查後端
.NET 火警檢查後端
每項技術所獲得的
每個堆疊使用相同的火災警報檢查後端架構和 API 合約。
統一的檢查數據結構
管理建築物、檢查、煙霧探測器日誌、電池日期和執法報告,使用一個架構。
隨時可用的探測器工作流程
從移動或網路捕捉探測器狀況、房間位置和電池日期。
供執法者的報告輸出
創建檢查摘要和交接報告,供管理者查看或匯出。
角色感知的檢查記錄
使檢查員、協調員和運營人員圍繞共享類別和權限保持一致。
消防警報檢查框架比較
比較所有支持的技術的設置速度、SDK 風格和 AI 支持。
| 框架 | 設置時間 | 檢查好處 | SDK 類型 | AI 支援 |
|---|---|---|---|---|
| 大約 5 分鐘 | 針對行動裝置和網頁的檢查團隊單一代碼庫。 | 類型化 SDK | 完整 | |
| 少於 5 分鐘 | 快速的網頁儀表板,用於檢測器日誌和報告。 | 類型化 SDK | 完整 | |
| 約3–7分鐘 | 檢查團隊的跨平台移動應用程式。 | Typed SDK | 完整 | |
| 快速(5分鐘)設置 | 伺服器渲染的操作入口網站,用於檢查記錄。 | Typed SDK | 完整 | |
| 約3–5分鐘 | 輕量級網頁整合,用於檢查工作流程。 | Typed SDK | 完整 | |
| 大約5分鐘 | Android 原生應用程式用於現場檢查。 | 輸入的 SDK | 完整 | |
| 少於 5 分鐘 | 原生 iPhone 應用程式用於檢查和報告。 | 輸入的 SDK | 完整 | |
| ~3–7 分鐘 | React 的檢查儀表板網頁 UI。 | 輸入的 SDK | 完整 | |
| 快速(5 分鐘)設置 | 企業應用程式以協調檢查。 | 輸入的 SDK | 完整 | |
| 少於 2 分鐘 | 靈活的 GraphQL API 用於嵌套檢查數據。 | GraphQL API | 完整 | |
| 快速(2 分鐘)設置 | REST API 的整合以構建和檢測端點。 | REST API | 完整 | |
| 約 3 分鐘 | 伺服器端 PHP 後端用於檢查報告。 | REST API | 完整 | |
| 約3–7分鐘 | .NET 用於火災警報檢查操作的後端。 | 輸入的SDK | 完整 |
設置時間反映從專案啟動到使用此模板架構進行第一次建築或檢查查詢的預期持續時間。
常見問題
有關使用此模板構建火災報警檢查後端的常見問題。