DELETE FROM approval_task WHERE id IN (
    'todo_processed_task_001', 'todo_processed_task_002',
    'todo_processed_task_003', 'todo_processed_task_004'
);
DELETE FROM approval_instance WHERE id IN (
    'todo_processed_inst_001', 'todo_processed_inst_002',
    'todo_processed_inst_003', 'todo_processed_inst_004'
);
DELETE FROM approval_flow_version WHERE id IN ('approval_flow_test_001');

INSERT INTO approval_flow_version (
    `id`, `flow_id`, `create_time`, `create_user`, `organization_id`
) VALUES (
    'approval_flow_test_001', 'approval_flow_test_main_001', 1736240043000, 'admin', '100001'
);

INSERT INTO approval_instance (`id`, `flow_version_id`, `type`, `resource_id`, `submitter_id`, `current_node_id`, `approval_status`, `submit_time`, `approval_time`,`create_time`, `update_time`, `create_user`, `update_user`)
VALUES
    ('todo_processed_inst_001', 'approval_flow_test_001', 'contract', 'todo_processed_resource_001', 'admin', 'node_done_1', 'APPROVED', 1736240043609, 1736241043609, 1736240043609, 1736241043609, 'admin', 'admin'),
    ('todo_processed_inst_002', 'approval_flow_test_001', 'quotation', 'todo_processed_resource_002', 'admin', 'node_done_2', 'APPROVED', 1736241043609, 1736242043609, 1736241043609, 1736242043609, 'admin', 'admin'),
    ('todo_processed_inst_003', 'approval_flow_test_001', 'order', 'todo_processed_resource_003', 'admin', 'node_done_3', 'REJECTED', 1736242043609, 1736243043609, 1736242043609, 1736243043609, 'admin', 'admin'),
    ('todo_processed_inst_004', 'approval_flow_test_001', 'invoice', 'todo_processed_resource_004', 'admin', 'node_done_4', 'CANCELED', 1736243043609, 1736244043609, 1736243043609, 1736244043609, 'admin', 'admin');

INSERT INTO approval_task (`id`, `node_id`, `node_round`, `instance_id`, `approver_id`, `status`, `type`, `action`, `create_time`, `update_time`, `create_user`, `update_user`)
VALUES
    ('todo_processed_task_001', 'node_done_1', 1, 'todo_processed_inst_001', 'admin', 'APPROVED', 'approve', 'APPROVED', 1736241043609, 1736241043609, 'admin', 'admin'),
    ('todo_processed_task_002', 'node_done_2', 1, 'todo_processed_inst_002', 'admin', 'APPROVED', 'approve', 'APPROVED', 1736242043609, 1736242043609, 'admin', 'admin'),
    ('todo_processed_task_003', 'node_done_3', 1, 'todo_processed_inst_003', 'admin', 'REJECTED', 'approve', 'REJECTED', 1736243043609, 1736243043609, 'admin', 'admin'),
    ('todo_processed_task_004', 'node_done_4', 1, 'todo_processed_inst_004', 'admin', 'CANCELED', 'approve', 'CANCELED', 1736244043609, 1736244043609, 'admin', 'admin');
