餐厅健康审计后台模板
餐厅卫生和检查跟踪
一个在 Back4app 上的准备就绪的 餐厅健康审计后台,用于卫生检查列表,害虫控制日志和评级跟踪。包括 ER 图,数据字典,JSON 架构,API 游乐场,以及一个 AI 代理 提示,便于快速启动。
关键要点
此模板为您提供餐厅健康审核后端,包含卫生检查清单、害虫记录和等级追踪,以便管理人员和现场工作人员可以在一个共享系统中工作。
- 卫生检查清单控制 — 建模审核检查清单和卫生检查条目,以便班次经理能够通过站点验证清洁任务。
- 害虫控制日志历史 — 跟踪每个餐厅位置的害虫日志问题、治疗和后续备注。
- 长期的等级追踪 — 使用等级记录来捕捉检查等级、评分细节和审查日期。
概述:餐厅健康审计
强有力的餐厅健康审计合规性故意设定得很无聊:一致的记录、明确的责任和不依赖记忆的审查痕迹。解决方案在于操作,而非激励。使用餐厅、审计清单、卫生检查、害虫日志和评分记录作为Back4app上的结构化合规基本要素,以便餐厅健康审计工作流程在各个地点和班次之间保持一致。该架构涵盖餐厅(名称、地址、许可编号)、审计清单(餐厅、审计日期、检查员、状态)、卫生检查(清单、站点、结果、备注)、害虫日志(餐厅、问题类型、处理日期、跟进到期)和评分记录(餐厅、分数、字母等级、检查日期)。连接前端,并更快启动审计工作流程。
最佳用于:
此餐厅健康审计后端的组织方式
移动队伍和后台员工在餐厅健康审计中看到不同的现实片段;产品工作的目标是将这些片段无缝连接,而不是互相指责。
中心保持餐厅、审计清单和卫生检查语言的一致性,以便在产品、运营和工程说“记录”时,它们的意思相同。
核心餐厅健康审计功能
该中心中的每个技术卡片都使用相同的餐厅健康审计后台架构,包括餐厅、审计检查表、卫生检查、虫害日志和等级记录。
餐厅位置跟踪
餐厅类存储名称、地址、permitNumber 和经理联系信息。
卫生检查表管理
审核检查表捕获餐厅、审核日期、检查员和状态。
卫生检查记录
卫生检查存储检查表、站点、结果、备注和照片证据。
虫害控制日志
PestLog 为每个餐厅保留问题类型、处理日期、后续到期及状态。
等级跟踪
GradeRecord 存储检查日期、分数、字母等级和检查员姓名。
为什么要用 Back4app 构建您的餐厅健康审计后端?
Back4app 为餐厅团队提供了审计、害虫跟进和评分的清晰数据模型,使应用程序能够专注于清单工作流程,而不是后端设置。
- •审计清单和卫生检查结构: 在审计清单内建模站点级检查,以便队伍可以记录准备台、水槽、冷却器和地板的卫生检查结果。
- •PestLog 历史和跟进: 使用 PestLog 字段,如 issueType、treatmentDate 和 followUpDue,按餐厅保持虫害控制记录的顺序。
- •GradeRecord 可见性: 在 GradeRecord 中存储检查分数,并显示每个餐厅位置的 letterGrade 趋势。
快速构建和调整餐厅审计工作流程,通过移动和网络共享一个后端合同。
核心好处
一个餐厅审计后台,使检查、虫害记录和等级易于查找和更新。
更快的检查清单部署
从AuditChecklist和SanitationCheck类开始,而不是从零开始设计每个审计表单。
清晰的虫害跟进历史
PestLog条目保留每个餐厅位置的治疗日期和跟进到期日期。
一致的等级记录
GradeRecord为管理者提供一种稳定的方式来查看检查分数随时间的变化。
符合角色的审计访问
经理、协调员和现场工作人员可以仅阅读或更新他们需要的餐厅和审计类。
审计证据集中在一个地方
将照片证据和备注附加到SanitationCheck条目,而不是在工具之间分散文件。
AI辅助设置
从一个结构化提示生成审计后端脚手架和集成说明。
准备好启动你的餐厅健康审计应用吗?
让Back4app AI代理搭建你的餐厅审计后端,并从一个提示中生成卫生检查清单、害虫日志和评分跟踪。
免费开始——每月50个AI代理提示,无需信用卡
技术栈
此餐厅健康审计后端模板中包含所有内容。
ER 图
餐厅健康审计后端架构的实体关系模型。
涵盖餐厅位置、卫生检查清单、害虫记录和健康等级的架构。
查看图表源
erDiagram
InspectorUser ||--o{ RestaurantLocation : "manages"
InspectorUser ||--o{ SanitationChecklist : "inspects"
InspectorUser ||--o{ PestControlLog : "reportedBy"
RestaurantLocation ||--o{ SanitationChecklist : "location"
RestaurantLocation ||--o{ PestControlLog : "location"
RestaurantLocation ||--o{ HealthGrade : "location"
SanitationChecklist ||--o{ HealthGrade : "source"
InspectorUser {
String objectId PK
String username
String email
String password
String role
String assignedRegion
Date createdAt
Date updatedAt
}
RestaurantLocation {
String objectId PK
String restaurantName
String address
String city
String healthPermitNumber
String currentGrade
String managerId FK
Date createdAt
Date updatedAt
}
SanitationChecklist {
String objectId PK
String locationId FK
String inspectorId FK
Date inspectionDate
String checklistType
Number score
Boolean passed
String notes
Date createdAt
Date updatedAt
}
PestControlLog {
String objectId PK
String locationId FK
String reportedById FK
Date serviceDate
String vendorName
String pestType
String treatmentNotes
Boolean followUpRequired
Date createdAt
Date updatedAt
}
HealthGrade {
String objectId PK
String locationId FK
String sanitationChecklistId FK
String grade
Date issuedOn
Date expiresOn
String publicNotes
Date createdAt
Date updatedAt
}
集成流程
登录、检查表加载、卫生更新、病虫害日志和成绩跟踪的典型运行流程。
查看图表源
sequenceDiagram
participant User
participant App as Restaurant Health Audit App
participant Back4app as Back4app Cloud
User->>App: Sign in as manager or inspector
App->>Back4app: POST /login
Back4app-->>App: Session token
User->>App: Load restaurant locations
App->>Back4app: GET /classes/RestaurantLocation
Back4app-->>App: Location list
User->>App: Submit sanitation checklist
App->>Back4app: POST /classes/SanitationChecklist
Back4app-->>App: Checklist objectId
User->>App: Record pest control visit and grade update
App->>Back4app: POST /classes/PestControlLog
App->>Back4app: POST /classes/HealthGrade
Back4app-->>App: Log and grade saved
App->>Back4app: Subscribe to live updates for HealthGrade
Back4app-->>App: Grade and checklist changes数据字典
餐厅健康审计模式中每个类的完整字段级参考。
| 字段 | 类型 | 描述 | 必填 |
|---|---|---|---|
| objectId | String | Auto-generated unique identifier | 自动 |
| username | String | Inspector login name | |
| String | Inspector email address | ||
| password | String | Hashed password (write-only) | |
| role | String | User role for audit workflows (e.g., manager, coordinator, field inspector) | |
| assignedRegion | String | Region or route handled by the inspector | — |
| createdAt | Date | Auto-generated creation timestamp | 自动 |
| updatedAt | Date | Auto-generated last-update timestamp | 自动 |
8 字段在 InspectorUser 中
安全性和权限
ACL 和 CLP 规则如何保护餐厅审计记录、害虫记录和评分历史。
角色感知的餐厅访问
管理员可以查看所有餐厅记录,而现场工作人员只能创建或更新分配给他们的审计。
检查表和日志所有权
使用 Cloud Code 验证 AuditChecklist、SanitationCheck 和 PestLog 条目属于正确的餐厅和用户角色。
成绩记录完整性
将成绩记录的创建或编辑锁定给已批准的协调员,以便检查分数保持准确。
架构 (JSON)
原始 JSON 架构定义,准备复制到 Back4app 或用作实现参考。
{
"classes": [
{
"className": "InspectorUser",
"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
},
"assignedRegion": {
"type": "String",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "RestaurantLocation",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"restaurantName": {
"type": "String",
"required": true
},
"address": {
"type": "String",
"required": true
},
"city": {
"type": "String",
"required": true
},
"healthPermitNumber": {
"type": "String",
"required": false
},
"currentGrade": {
"type": "String",
"required": false
},
"manager": {
"type": "Pointer",
"required": true,
"targetClass": "InspectorUser"
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "SanitationChecklist",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"location": {
"type": "Pointer",
"required": true,
"targetClass": "RestaurantLocation"
},
"inspector": {
"type": "Pointer",
"required": true,
"targetClass": "InspectorUser"
},
"inspectionDate": {
"type": "Date",
"required": true
},
"checklistType": {
"type": "String",
"required": true
},
"score": {
"type": "Number",
"required": true
},
"passed": {
"type": "Boolean",
"required": true
},
"notes": {
"type": "String",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "PestControlLog",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"location": {
"type": "Pointer",
"required": true,
"targetClass": "RestaurantLocation"
},
"reportedBy": {
"type": "Pointer",
"required": true,
"targetClass": "InspectorUser"
},
"serviceDate": {
"type": "Date",
"required": true
},
"vendorName": {
"type": "String",
"required": true
},
"pestType": {
"type": "String",
"required": true
},
"treatmentNotes": {
"type": "String",
"required": false
},
"followUpRequired": {
"type": "Boolean",
"required": true
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "HealthGrade",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"location": {
"type": "Pointer",
"required": true,
"targetClass": "RestaurantLocation"
},
"sanitationChecklist": {
"type": "Pointer",
"required": true,
"targetClass": "SanitationChecklist"
},
"grade": {
"type": "String",
"required": true
},
"issuedOn": {
"type": "Date",
"required": true
},
"expiresOn": {
"type": "Date",
"required": false
},
"publicNotes": {
"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. 卫生检查:检查表(指向审计检查表的指针,必需),站点(字符串,必需),结果(字符串,必需),备注(字符串),照片证据(文件);objectId,createdAt,updatedAt(系统)。 5. 害虫日志:餐厅(指向餐厅的指针,必需),问题类型(字符串,必需),处理日期(日期,必需),后续到期(日期),状态(字符串,必需),备注(字符串);objectId,createdAt,updatedAt(系统)。 6. 评分记录:餐厅(指向餐厅的指针,必需),检查日期(日期,必需),分数(数字,必需),字母等级(字符串,必需),检查员姓名(字符串);objectId,createdAt,updatedAt(系统)。 安全性: - 管理员可以查看所有餐厅记录。现场工作人员只能创建或更新分配的审计记录。使用云代码验证所有权和角色。 认证: - 注册,登录,登出。 行为: - 加载审计检查表,添加卫生检查,保存害虫日志,更新评分记录。 交付: - 带有架构、ACL、CLP的 Back4app 应用程序;餐厅的前端,审计检查表,卫生检查,害虫日志和评分跟踪。
按下面的按钮打开代理,模板提示已预填充。
这是基础提示,没有技术后缀。您可以在之后调整生成的前端栈。
API 游乐场
尝试对餐厅健康审计架构使用 REST 和 GraphQL 端点。响应使用模拟数据,不需要 Back4app 账户。
使用与此模板相同的架构。
选择您的技术
展开每个卡片以查看如何将餐厅、审计检查表和卫生检查与您选择的技术栈集成。
Flutter 餐厅健康审计后端
React 餐厅健康审计后端
React 本地 餐厅健康审计后端
Next.js 餐厅健康审计后端
JavaScript 餐厅健康审计后端
Android 餐厅健康审计后端
iOS 餐厅健康审计后端
Vue 餐厅健康审计后端
Angular 餐厅健康审计后端
GraphQL 餐厅健康审计后端
REST API 餐厅健康审计后端
PHP 餐厅健康审计后端
.NET 餐厅健康审计后端
您获得的每种技术
每个技术栈使用相同的餐厅健康审计后端架构和 API 合同。
统一的餐厅审计数据结构
使用一个架构管理餐厅、审计检查表、卫生检查、虫害记录和评分记录。
卫生检查表工作流
创建检查项并存储厨房和服务区域的站点结果。
虫害控制跟踪
记录每家餐厅的 issueType、treatmentDate 和 followUpDue 值。
检查的评分跟踪
比较不同检查和地点的分数和 letterGrade 值。
REST/GraphQL APIs 用于审计
使用灵活的 API 集成移动或 Web 客户端,适用于每个审计类别。
餐厅审计框架比较
比较所有受支持技术的设置速度、SDK 风格和 AI 支持。
| 框架 | 设置时间 | 餐厅审计好处 | SDK 类型 | 人工智能支持 |
|---|---|---|---|---|
| 约 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 | 完整 |
设置时间反映从项目启动到首次餐厅、检查清单或使用此模板架构的评分查询的预期持续时间。
常见问题
有关使用此模板构建餐厅健康审计后端的常见问题。