關鍵要點
此模板提供您一個包含設施、保險箱、鑰匙分配和訪問日誌數據的保險箱應用後端,以便您的員工能夠有效地組織箱子的佔用情況和金庫的進入。
- 與設施相連的庫存 — 將每個保險箱模型對應到一個設施,以便管理桌知道每個箱子的位置。
- 鑰匙分配保管 — 追蹤哪位用戶擁有箱鑰,何時發放,以及何時歸還。
- 訪問日誌審計足跡 — 記錄每次進入、檢查或取款,在訪問日誌中附上時間戳和驗證者。
- 櫃台人員控制 — 使用 User.role、Facility.manager 和 KeyAssignment.issuedBy 將交接與工作人員綁定。
- 跨平台後端 — 通過一個 REST 和 GraphQL API 為箱子、鑰匙和訪問記錄提供網絡和移動工具。
什麼是保險箱應用範本?
在保險箱應用中,操作事實就是日程——如果日曆錯了,每個後續承諾也都是錯的。Back4app 為需要與客戶面對的流程保持同步的保險箱應用產品供應設施、保險箱、鑰匙分配和訪問日志提供動力。架構涵蓋了用戶(用戶名、電子郵件、密碼、角色、電話)、設施(設施代碼、名稱、地址、安全級別、狀態、經理)、保險箱(箱號、大小、狀態、設施、當前租戶、月租金、訪問政策)、鑰匙分配(箱子、租戶、鑰匙標籤、發放時間、歸還時間、狀態、發放者)和訪問日志(箱子、用戶、設施、訪問類型、訪問時間、註釋、驗證者),並內建身份驗證和受控訪問。連接您喜歡的前端,並更快發貨。
最佳用途:
安全存款應用後端概覽
隨著人員變動,季節性波動對安全存款應用影響最大,但資料模型不隨著新的SKU、站點或政策而彈性調整。
利益相關者可以在此檢查設施、安全存款箱和金鑰指派的覆蓋情況:名稱、關係和它們啟用的工作流程。
保險箱應用核心功能
這個中心中的每個技術卡片都使用相同的租賃後端架構,包括用戶、設施、安全存儲箱、鑰匙分配和訪問日誌。
員工和客戶帳戶
用戶存儲員工、所有者和客戶的用戶名、電子郵件、角色和電話。
設施記錄
設施跟踪設施代碼、名稱、地址、安全級別、狀態和經理。
盒子庫存與狀態
SafeDepositBox 追蹤 boxNumber、大小、狀態、每月費率和訪問政策。
鑰匙分配工作流程
KeyAssignment 連結盒子、租戶、鑰匙標籤、發出時間、歸還時間和發出者。
訪問日誌歷史
AccessLog 記錄盒子、用戶、設施、訪問類型、訪問時間、備註和確認者。
為什麼要使用 Back4app 構建您的保險箱應用後端?
Back4app 為您提供設施、SafeDepositBox、KeyAssignment 和 AccessLog 原語,以便您的員工能專注於出租和安全審查,而無需關注後端 plumbing。
- •盒子和鑰匙保管記錄: SafeDepositBox 類和 KeyAssignment 類將庫存、狀態和交接細節綁定在一起。
- •設施安全和審計路徑: Facility.manager 和 AccessLog 記錄使分支檢查和金庫訪問的審查變得簡單。
- •實時 + API 靈活性: 在保持 REST 和 GraphQL 可用於桌面軟體和客戶門戶的同時,使用 Live Queries 進行 KeyAssignment 更改。
快速構建和迭代租賃台工作流程,並在所有平台上使用一個後端合約。
安全存儲應用的好處
一個能夠保持辦公桌操作井然有序的租賃後端,而不會使訪問變得難以追蹤。
更快的箱子入庫
從完整的用戶、設施、安全存儲箱和鑰匙分配架構開始,而不是從零開始草擬租賃表格。
可追蹤的訪問處理
捕捉每個訪問日誌條目,讓員工可以檢查誰在何時進入保險庫。
清晰的保管記錄
使用像 keyTag、issuedAt 和 returnedAt 這樣的鑰匙分配字段來顯示哪把鑰匙在流通。
設施級別審查
存儲 Facility.securityLevel 和 AccessLog 記錄,以便分支經理在開放訪問之前檢查準備情況。
租賃和訪問數據
將箱子狀態、租戶分配和設施檢查保存在一個架構中,而無需重寫您的 API 合約。
AI 啟動工作流程
通過一個結構化提示快速生成後端骨架和集成指導。
準備啟動您的保險箱應用程序?
讓 Back4app AI 代理搭建您的租賃後端,並從一個提示中生成 Facility、SafeDepositBox、KeyAssignment 和 AccessLog 流程。
免費開始 - 每月 50 條 AI 代理提示,無需信用卡
保險箱應用技術棧
此保險箱應用後端模板中包含所有內容。
安全存款 ER 模型
保險箱應用程序架構的實體關係模型。
涵蓋用戶、設施、保險箱、鑰匙分配和訪問日誌的架構。
查看圖表來源
erDiagram
User ||--o{ Facility : "manager"
Facility ||--o{ SafeDepositBox : "houses"
User ||--o{ SafeDepositBox : "currentTenant"
SafeDepositBox ||--o{ KeyAssignment : "box"
User ||--o{ KeyAssignment : "tenant"
User ||--o{ KeyAssignment : "issuedBy"
SafeDepositBox ||--o{ AccessLog : "box"
User ||--o{ AccessLog : "user"
Facility ||--o{ AccessLog : "facility"
User ||--o{ AccessLog : "verifiedBy"
User {
String objectId PK
String username
String email
String password
String role
String phone
Date createdAt
Date updatedAt
}
Facility {
String objectId PK
String facilityCode
String name
String address
String securityLevel
String status
String managerId FK
Date createdAt
Date updatedAt
}
SafeDepositBox {
String objectId PK
String boxNumber
String size
String status
String facilityId FK
String currentTenantId FK
Number monthlyRate
String accessPolicy
Date createdAt
Date updatedAt
}
KeyAssignment {
String objectId PK
String boxId FK
String tenantId FK
String keyTag
Date issuedAt
Date returnedAt
String status
String issuedById FK
Date createdAt
Date updatedAt
}
AccessLog {
String objectId PK
String boxId FK
String userId FK
String facilityId FK
String accessType
Date accessedAt
String notes
String verifiedById FK
Date createdAt
Date updatedAt
}
桌面集成流程
身份驗證、查找保險箱、鑰匙分配、訪問日誌記錄和設施審查的典型運行流程。
查看序列來源
sequenceDiagram
participant User
participant App as Safe Deposit Box Rental App
participant Back4app as Back4app Cloud
User->>App: Sign in to the rental desk or customer portal
App->>Back4app: POST /login
Back4app-->>App: Session token
User->>App: Open facility dashboard
App->>Back4app: GET /classes/Facility?include=manager
Back4app-->>App: Facility list with securityLevel and status
User->>App: Review available safe deposit boxes
App->>Back4app: GET /classes/SafeDepositBox?include=facility,currentTenant&order=boxNumber
Back4app-->>App: Boxes with size, monthlyRate, and accessPolicy
User->>App: Issue or return a key assignment
App->>Back4app: POST /classes/KeyAssignment
Back4app-->>App: KeyAssignment objectId and status
User->>App: Record a facility access visit
App->>Back4app: POST /classes/AccessLog
Back4app-->>App: AccessLog saved and ready for live updates安全存款欄位指南
安全存款應用程式結構中每個類別的完整欄位級別參考。
| 欄位 | 類型 | 描述 | 必填 |
|---|---|---|---|
| objectId | String | Auto-generated unique identifier | 自動 |
| username | String | Login name for staff, owners, or customers | |
| String | Email address used for account contact | ||
| password | String | Hashed password (write-only) | |
| role | String | Account role such as admin, deskStaff, owner, or customer | |
| phone | String | Contact number for access coordination | — |
| createdAt | Date | Auto-generated creation timestamp | 自動 |
| updatedAt | Date | Auto-generated last-update timestamp | 自動 |
8 欄位在 User
安全性與權限
ACL 和 CLP 策略如何保障用戶、設施、安全存款箱、鑰匙指派和訪問記錄。
員工帳戶控制
只有授權的員工才能編輯用戶角色和更新設施記錄。
箱子和鑰匙保管完整性
只有租賃櫃檯的員工可以創建或關閉鑰匙分配記錄並更改保險箱狀態。
範圍訪問可見性
限制訪問日誌的讀取僅限於租戶、指派的員工或有業務需求查看訪問的分支經理。
JSON Schema
原始 JSON 結構定義,準備複製到 Back4app 或作為實施參考使用。
{
"classes": [
{
"className": "User",
"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
},
"phone": {
"type": "String",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "Facility",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"facilityCode": {
"type": "String",
"required": true
},
"name": {
"type": "String",
"required": true
},
"address": {
"type": "String",
"required": true
},
"securityLevel": {
"type": "String",
"required": true
},
"status": {
"type": "String",
"required": true
},
"manager": {
"type": "Pointer",
"required": true,
"targetClass": "User"
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "SafeDepositBox",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"boxNumber": {
"type": "String",
"required": true
},
"size": {
"type": "String",
"required": true
},
"status": {
"type": "String",
"required": true
},
"facility": {
"type": "Pointer",
"required": true,
"targetClass": "Facility"
},
"currentTenant": {
"type": "Pointer",
"required": false,
"targetClass": "User"
},
"monthlyRate": {
"type": "Number",
"required": true
},
"accessPolicy": {
"type": "String",
"required": true
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "KeyAssignment",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"box": {
"type": "Pointer",
"required": true,
"targetClass": "SafeDepositBox"
},
"tenant": {
"type": "Pointer",
"required": true,
"targetClass": "User"
},
"keyTag": {
"type": "String",
"required": true
},
"issuedAt": {
"type": "Date",
"required": true
},
"returnedAt": {
"type": "Date",
"required": false
},
"status": {
"type": "String",
"required": true
},
"issuedBy": {
"type": "Pointer",
"required": true,
"targetClass": "User"
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "AccessLog",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"box": {
"type": "Pointer",
"required": true,
"targetClass": "SafeDepositBox"
},
"user": {
"type": "Pointer",
"required": true,
"targetClass": "User"
},
"facility": {
"type": "Pointer",
"required": true,
"targetClass": "Facility"
},
"accessType": {
"type": "String",
"required": true
},
"accessedAt": {
"type": "Date",
"required": true
},
"notes": {
"type": "String",
"required": false
},
"verifiedBy": {
"type": "Pointer",
"required": true,
"targetClass": "User"
},
"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. 鑰匙分配:箱子(指向安全存儲箱)、租戶(指向用戶)、鑰匙標籤、簽發時間、歸還時間(可選)、狀態、簽發者(指向用戶);objectId、createdAt、updatedAt。 5. 訪問日誌:箱子(指向安全存儲箱)、用戶(指向用戶)、設施(指向設施)、訪問類型、訪問時間、備註(可選)、驗證者(指向用戶);objectId、createdAt、updatedAt。 安全性: - 只有經過身份驗證的工作人員才能創建或更新設施和安全存儲箱記錄。 - 鑰匙分配的創建必須要求一個有效的箱子和租戶。 - 訪問日誌的創建應限制在工作人員或已驗證的工作流程之內。 - 所有者和客戶可以閱讀自己的箱子、鑰匙分配和訪問日誌,但不能閱讀其他租戶的私人條目。 身份驗證: - 註冊、登錄、登出。 行為: - 列出設施和箱子、發放和歸還鑰匙、記錄訪問,並顯示最近的訪問活動。 發佈: - 包含模式、CLP、ACL 和設施、箱子庫存、鑰匙分配處理和訪問日誌的前端視圖的 Back4app 應用。
按下下面的按鈕以使用此模板提示打開代理。
這是沒有技術後綴的基本提示。您可以在後續調整生成的前端堆棧。
API 沙盒
嘗試對安全存款應用程序架構使用 REST 和 GraphQL 端點。響應使用模擬數據,無需 Back4app 帳戶。
使用與此模板相同的架構。
選擇您的技術
展開每個卡片以查看如何將設施、安全存款箱和鑰匙分配與您所選的技術棧整合。
Flutter 保險箱應用後端
React 保險箱應用後端
React 原生 保險箱應用後端
Next.js 保險箱應用後端
JavaScript 保險箱應用後端
Android 保險箱應用後端
iOS 保險箱應用後端
Vue 保險箱應用後端
Angular 保險箱應用後端
GraphQL 保險箱應用後端
REST API 保險箱應用後端
PHP 保險箱應用後端
.NET 保險箱應用後端
每種技術的收穫
每個棧都使用相同的保險箱應用程式架構和 API 合約。
統一的租賃數據結構
使用一個架構管理用戶、設施、箱子、鑰匙分配和訪問日誌。
控制鑰匙交接流程
追蹤每個箱子發放和歸還的鑰匙,並保持清晰的分配記錄。
即時審計的訪問日誌
存儲帶有時間戳的進入事件、已驗證的員工和訪問記錄。
分支審查支持
在發放鑰匙之前,記錄每個地點的安全等級和設施狀態。
REST/GraphQL APIs 用於租賃操作
將桌面工具和客戶應用集成,並提供靈活的端點。
可擴展的設施架構
添加警報、維護檢查或客戶通知而不破壞核心模型。
安全存儲應用程序技術比較
比較所有支持技術的設置速度、SDK風格和AI支持。
| 框架 | 設置時間 | 租賃效益 | SDK類型 | AI支持 |
|---|---|---|---|---|
| 大約 5 分鐘 | 針對移動和網絡的租賃桌面應用的單一代碼庫。 | 類型化 SDK | 完整 | |
| 少於 5 分鐘 | 快速網絡儀表板,用於箱子分配和訪問日誌。 | 類型化 SDK | 完整 | |
| 約 3–7 分鐘 | 跨平台的移動應用程序,用於鑰匙交接。 | 類型化 SDK | 完整 | |
| 快速(5 分鐘)設置 | 服務器渲染的員工門戶以進行分支操作。 | 輸入的 SDK | 完整 | |
| 約 3–5 分鐘 | 輕量級網絡集成的租賃桌工具。 | 輸入的 SDK | 完整 | |
| 大約 5 分鐘 | 原生 Android 應用程序用於箱子和鑰匙工作流程。 | 輸入的 SDK | 完整 | |
| 少於 5 分鐘 | 原生 iOS 應用程式供分支員工和主管使用。 | 輸入的 SDK | 完整 | |
| 約 3–7 分鐘 | 供租賃服務台操作的 React 版網頁用戶介面。 | 類型化 SDK | 完整 | |
| 快速(5 分鐘)設置 | 供設施經理使用的企業網頁應用程式。 | 類型化 SDK | 完整 | |
| 少於 2 分鐘 | 靈活的 GraphQL API 用於租賃和訪問數據。 | GraphQL API | 完整 | |
| 快速 (2 分鐘) 設定 | REST API 整合桌面和審核工具。 | REST API | 完整 | |
| 約 3 分鐘 | 伺服器端 PHP 後端用於分支操作。 | REST API | 完整 | |
| 約 3–7 分鐘 | .NET 後端用於安全的租賃工作流程。 | 類型化 SDK | 完整 |
設置時間反映從項目啟動到使用此模板架構的首次SafeDepositBox或KeyAssignment查詢的預期持續時間。
安全存放問題
有關使用此模板構建安全存放應用後端的常見問題。