Files
CarLog/server/migrations/0015_wash_photos.sql
T
wsh5485 fe17886ac4 feat: 洗车管理系统 v2.8 — 个人 detailer 单用户全栈应用
- 车辆 / 洗车 / 加油 / 充电 / 保养 / 保险 完整 CRUD + 软删
- AI 截图识别(5 类型 OCR schema):OpenAI 兼容 + MiniMax M3
- 化学品 / Grocy 实例对接 + 库存镜像同步
- 仪表盘:30 天频次 + 健康度 + 同比环比 + 油价趋势 + 年均养护
- 月度报表:Excel 6 sheet + PDF
- PWA:manifest / SW / 离线缓存 / iOS 引导
- 安全:bcrypt + CSRF + 登录锁定(IP/用户/全局三级)+ 401 自动跳登录 + 表单草稿
- 高 ROI 8 功能:里程/提醒/成本/搜索/标签/通知/同比/成就
- 3 个新 migration(0016/0017/0018)+ 18 个迁移全幂等
- 101/101 测试通过(含 ipRateLimit / CSRF / retry / stats / tags / notifications)
- 部署:宝塔面板文档 + PM2 + Nginx
2026-06-20 21:11:54 +08:00

20 lines
1.0 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 0015_wash_photos.sql (MySQL) — 洗车对比照(before / after / detail
CREATE TABLE IF NOT EXISTS wash_photos (
id INT AUTO_INCREMENT PRIMARY KEY,
wash_id INT NOT NULL,
photo_type VARCHAR(20) NOT NULL DEFAULT 'detail', -- before / after / detail / scene
file_path VARCHAR(500) NOT NULL,
file_name VARCHAR(255) NOT NULL,
mime_type VARCHAR(50) DEFAULT NULL,
file_size INT DEFAULT NULL,
width INT DEFAULT NULL,
height INT DEFAULT NULL,
caption VARCHAR(255) DEFAULT NULL,
sort_order INT NOT NULL DEFAULT 0,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
is_deleted TINYINT(1) NOT NULL DEFAULT 0,
INDEX idx_wash_photos_wash (wash_id, is_deleted),
INDEX idx_wash_photos_type (photo_type),
INDEX idx_wash_photos_created (created_at DESC)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;