126 lines
3.6 KiB
SQL
126 lines
3.6 KiB
SQL
-- Dummy Digit Motor full-flow seed (matches current live schema column lengths)
|
|
|
|
DELETE k FROM motor_kyc k
|
|
INNER JOIN motor_quote q ON q.id = k.quote_id
|
|
WHERE q.enquiry_id = 'DEMO_FULL_FLOW_01';
|
|
|
|
DELETE p FROM motor_payment p
|
|
INNER JOIN motor_quote q ON q.id = p.quote_id
|
|
WHERE q.enquiry_id = 'DEMO_FULL_FLOW_01';
|
|
|
|
DELETE pol FROM motor_policy pol
|
|
INNER JOIN motor_quote q ON q.id = pol.quote_id
|
|
WHERE q.enquiry_id = 'DEMO_FULL_FLOW_01';
|
|
|
|
DELETE v FROM motor_vehicle v
|
|
INNER JOIN motor_quote q ON q.id = v.quote_id
|
|
WHERE q.enquiry_id = 'DEMO_FULL_FLOW_01';
|
|
|
|
DELETE FROM motor_quote WHERE enquiry_id = 'DEMO_FULL_FLOW_01';
|
|
|
|
INSERT INTO motor_quote (
|
|
enquiry_id, quote_number, application_id, policy_holder_type,
|
|
insurance_product_code, sub_insurance_product_code,
|
|
previous_insurer_code, previous_policy_expiry_date, external_policy_number,
|
|
is_ncb_transfer, start_date, end_date, pincode,
|
|
coverage_details, premium, idv, status, created_at, updated_at
|
|
) VALUES (
|
|
'DEMO_FULL_FLOW_01',
|
|
'D700690360',
|
|
'V2F7789D887C44F1E8D87C1A7D50874F61F25EA9335D73AC40FBE994E1FFB696',
|
|
'INDIVIDUAL',
|
|
'20101',
|
|
'PB',
|
|
190,
|
|
'2026-05-04',
|
|
'PREV190DEMO01',
|
|
0,
|
|
'2026-04-17',
|
|
'2027-04-16',
|
|
'560068',
|
|
JSON_OBJECT(
|
|
'personal_accident', true,
|
|
'zero_dep', true,
|
|
'engine_protect', false,
|
|
'rsa', true,
|
|
'consumables', true,
|
|
'key_protect', true,
|
|
'tppd', true
|
|
),
|
|
13301.21,
|
|
284500.00,
|
|
'EFFECTIVE',
|
|
NOW(),
|
|
NOW()
|
|
);
|
|
|
|
SET @qid = LAST_INSERT_ID();
|
|
|
|
INSERT INTO motor_vehicle (
|
|
quote_id, is_vehicle_new, vehicle_maincode, license_plate_number,
|
|
vehicle_identification_number, engine_number, manufacture_date, registration_date,
|
|
idv, default_idv, minimum_idv, maximum_idv
|
|
) VALUES (
|
|
@qid, 0, '1113811407', 'GJ04DA8726',
|
|
'MAKGM651CJ4306951', 'L15Z15337915', '2014-01-10', '2014-01-10',
|
|
284500.00, 280000.00, 255000.00, 310000.00
|
|
);
|
|
|
|
INSERT INTO motor_kyc (
|
|
quote_id, kyc_id, kyc_verification_status, reference_id, link,
|
|
mismatch_type, id_verification_doc_type, address_verification_doc_type,
|
|
mode, checked_at
|
|
) VALUES (
|
|
@qid,
|
|
'KYC-DEMO-10042',
|
|
'DONE',
|
|
'RF29268010042',
|
|
'https://example.com/kyc/ovd/demo',
|
|
NULL,
|
|
'Aadhaar',
|
|
'Aadhaar',
|
|
'O',
|
|
NOW()
|
|
);
|
|
|
|
INSERT INTO motor_payment (
|
|
quote_id, application_id, digit_payment_id, request_reference,
|
|
payment_mode, cancel_return_url, success_return_url, dispatcher_response,
|
|
premium, payment_status, created_at
|
|
) VALUES (
|
|
@qid,
|
|
'V2F7789D887C44F1E8D87C1A7D50874F61F25EA9335D73AC40FBE994E1FFB696',
|
|
'DPY29268010042',
|
|
'REQ-DEMO-10042',
|
|
'EB',
|
|
'http://localhost/nhance/digit-motor/payment/callback/cancel/0',
|
|
'http://localhost/nhance/digit-motor/payment/callback/success/0',
|
|
'https://example.com/digit/payment/demo-link',
|
|
13301.21,
|
|
'PAID',
|
|
NOW()
|
|
);
|
|
|
|
UPDATE motor_payment
|
|
SET
|
|
cancel_return_url = CONCAT('http://localhost/nhance/digit-motor/payment/callback/cancel/', @qid),
|
|
success_return_url = CONCAT('http://localhost/nhance/digit-motor/payment/callback/success/', @qid)
|
|
WHERE quote_id = @qid;
|
|
|
|
INSERT INTO motor_policy (
|
|
quote_id, policy_number, policy_status, schedule_path, proposal_path,
|
|
response_code, response_message, updated_at
|
|
) VALUES (
|
|
@qid,
|
|
'D700690360',
|
|
'EFFECTIVE',
|
|
'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf',
|
|
'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf',
|
|
'0',
|
|
'Policy is effective',
|
|
NOW()
|
|
);
|
|
|
|
SELECT @qid AS demo_quote_id, enquiry_id, quote_number, status
|
|
FROM motor_quote WHERE id = @qid;
|