251120:2340 Setting Project แก้ Correspondence

This commit is contained in:
2025-11-20 23:49:19 +07:00
parent 20c0f51e2a
commit 58cee2d007
8 changed files with 2467 additions and 16 deletions

19
test.sql Normal file
View File

@@ -0,0 +1,19 @@
-- 1. สร้าง Template ชื่อ "General Approval"
INSERT INTO correspondence_routing_templates (id, template_name, description, is_active)
VALUES (
1,
'General Approval',
'Template สำหรับการอนุมัติทั่วไป',
1
);
-- 2. สร้าง Steps (ส่งไป Org ID 1 ก่อน แล้วส่งไป Org ID 2)
-- (สมมติว่า Org ID 1 = Owner, Org ID 2 = Consultant ตาม Seed Data เดิม)
INSERT INTO correspondence_routing_template_steps (
template_id,
sequence,
to_organization_id,
step_purpose,
expected_days
)
VALUES (1, 1, 22, 'FOR_REVIEW', 3),
(1, 2, 1, 'FOR_APPROVAL', 5);