feat: 支持验收图片暂存
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
-- 019_acceptance_draft.sql —— 验收图片暂存(草稿)。
|
||||
--
|
||||
-- 说明:
|
||||
-- 1. 上传图片与提交验收分离:打手可先把验收图片/说明保存为暂存草稿,
|
||||
-- 不改变工单状态,刷新页面不丢失;提交验收时草稿作为初始内容;
|
||||
-- 2. 已提交验收(pending_acceptance)的工单仍可补充/修改图片,
|
||||
-- 直接更新 acceptance_json(保留原 submitted_at);
|
||||
-- 3. 整单草稿存 work_orders.draft_acceptance_json,
|
||||
-- 拼单草稿存各自 work_order_shares.draft_acceptance_json。
|
||||
|
||||
ALTER TABLE work_orders
|
||||
ADD COLUMN IF NOT EXISTS draft_acceptance_json JSONB NOT NULL DEFAULT '{}'::jsonb;
|
||||
|
||||
ALTER TABLE work_order_shares
|
||||
ADD COLUMN IF NOT EXISTS draft_acceptance_json JSONB NOT NULL DEFAULT '{}'::jsonb;
|
||||
|
||||
COMMENT ON COLUMN work_orders.draft_acceptance_json IS '打手暂存的验收草稿({note, files, imageUrls, updatedAt}),未提交时保存于此,提交后清空';
|
||||
COMMENT ON COLUMN work_order_shares.draft_acceptance_json IS '拼单打手各自暂存的验收草稿({note, files, imageUrls, updatedAt}),提交后清空';
|
||||
Reference in New Issue
Block a user