--
-- Master table values for CountryMaster
--
LOCK TABLES CountryMaster WRITE;
DELETE FROM CountryMaster;
INSERT INTO CountryMaster(name) VALUES
('India'),
('Indonesia');
UNLOCK TABLES;

-- Setting master values in variables for downstream usage
SELECT @indiaCountryId := id FROM CountryMaster WHERE name = 'India';

--
-- Master table values for CountryStateMaster
--
LOCK TABLES CountryStateMaster WRITE;
DELETE FROM CountryStateMaster;
INSERT INTO CountryStateMaster(country_id, name, code) VALUES
(@indiaCountryId, 'Andhra Pradesh', 'AP'),
(@indiaCountryId, 'Arunachal Pradesh', 'AC'),
(@indiaCountryId, 'Assam', 'AS'),
(@indiaCountryId, 'Bihar', 'BI'),
(@indiaCountryId, 'Chhattisgarh','CG'),
(@indiaCountryId, 'Delhi', 'DL'),
(@indiaCountryId, 'Goa', 'GO'),
(@indiaCountryId, 'Gujarat', 'GU'),
(@indiaCountryId, 'Haryana', 'HA'),
(@indiaCountryId, 'Himachal Pradesh', 'HP'),
(@indiaCountryId, 'Jammu and Kashmir', 'JK'),
(@indiaCountryId, 'Jharkhand', 'JH'),
(@indiaCountryId, 'Karnataka', 'KA'),
(@indiaCountryId, 'Kerala', 'KE'),
(@indiaCountryId, 'Madhya Pradesh', 'MP'),
(@indiaCountryId, 'Maharashtra', 'MH'),
(@indiaCountryId, 'Manipur', 'MN'),
(@indiaCountryId, 'Meghalaya', 'ME'),
(@indiaCountryId, 'Mizoram', 'MZ'),
(@indiaCountryId, 'Nagaland', 'NA'),
(@indiaCountryId, 'Odisha', 'OR'),
(@indiaCountryId, 'Punjab', 'PB'),
(@indiaCountryId, 'Rajasthan', 'RJ'),
(@indiaCountryId, 'Sikkim', 'SI'),
(@indiaCountryId, 'Tamil Nadu', 'TN'),
(@indiaCountryId, 'Telangana', 'TS'),
(@indiaCountryId, 'Tripura', 'TR'),
(@indiaCountryId, 'Uttar Pradesh', 'UP'),
(@indiaCountryId, 'Uttarakhand', 'UA'),
(@indiaCountryId, 'West Bengal', 'WB'),
(@indiaCountryId, 'Puducherry', 'PY');
UNLOCK TABLES;

--
-- Master table values for CountryBankMaster
--
LOCK TABLES CountryBankMaster WRITE;
DELETE FROM CountryBankMaster;
INSERT INTO CountryBankMaster(country_id, name) VALUES
(@indiaCountryId, 'Allahabad Bank'),
(@indiaCountryId, 'Andhra Bank'),
(@indiaCountryId, 'Axis Bank'),
(@indiaCountryId, 'Bank of Baroda'),
(@indiaCountryId, 'Bank of India'),
(@indiaCountryId, 'Bank of Maharashtra'),
(@indiaCountryId, 'Bank of Rajasthan'),
(@indiaCountryId, 'Canara Bank'),
(@indiaCountryId, 'Catholic Syrian Bank'),
(@indiaCountryId, 'Central Bank of India'),
(@indiaCountryId, 'City Union Bank'),
(@indiaCountryId, 'Corporation Bank'),
(@indiaCountryId, 'Dena Bank'),
(@indiaCountryId, 'Dhanlaxmi Bank'),
(@indiaCountryId, 'Federal Bank'),
(@indiaCountryId, 'HDFC Bank'),
(@indiaCountryId, 'ICICI Bank'),
(@indiaCountryId, 'IDBI Bank'),
(@indiaCountryId, 'Indian Bank'),
(@indiaCountryId, 'Indian Overseas Bank'),
(@indiaCountryId, 'IndusInd Bank'),
(@indiaCountryId, 'ING Vysya Bank'),
(@indiaCountryId, "Jammu & Kashmir Bank"),
(@indiaCountryId, 'Karnataka Bank'),
(@indiaCountryId, 'Karur Vysya Bank'),
(@indiaCountryId, 'Kotak Mahindra Bank'),
(@indiaCountryId, 'Lakshmi Vilas Bank'),
(@indiaCountryId, 'Nainital Bank'),
(@indiaCountryId, 'Oriental Bank of Commerce'),
(@indiaCountryId, 'Punjab and Sind Bank'),
(@indiaCountryId, 'Punjab National Bank'),
(@indiaCountryId, 'Saraswat Bank'),
(@indiaCountryId, 'South Indian Bank'),
(@indiaCountryId, "State Bank of Bikaner & Jaipur"),
(@indiaCountryId, 'State Bank of Hyderabad'),
(@indiaCountryId, 'State Bank of India'),
(@indiaCountryId, 'State Bank of Mysore'),
(@indiaCountryId, 'State Bank of Patiala'),
(@indiaCountryId, 'State Bank of Travancore'),
(@indiaCountryId, 'Syndicate Bank'),
(@indiaCountryId, 'Tamilnad Mercantile Bank'),
(@indiaCountryId, 'Uco Bank'),
(@indiaCountryId, 'Union Bank of India'),
(@indiaCountryId, 'United Bank of India'),
(@indiaCountryId, 'Vijaya Bank'),
(@indiaCountryId, 'Yes Bank');
UNLOCK TABLES;

--
-- Master table values for IdentityProofMaster
--
LOCK TABLES IdentityProofMaster WRITE;
DELETE FROM IdentityProofMaster;
INSERT INTO IdentityProofMaster(name, valid_id_proof, valid_address_proof, is_identity_no_applicable, is_identity_no_mandatory, allow_multiple, system_defined, country_id,is_active) VALUES
("Aadhaar Card", 1, 1, 1, 1, 0, 1, @indiaCountryId,1), 
("CIN", 1, 0, 0, 0, 0, 1, NULL,1), 
("Driving License", 1, 0, 1, 1, 0, 1, @indiaCountryId,1), 
("Identity Card - subject to bank's satisfaction", 1, 0, 1, 1, 0, 1, @indiaCountryId,1), 
("Letter from recognized public authority/servant", 1, 1, 1, 0, 0, 1, @indiaCountryId,1), 
("MNREGA Job Card", 1, 1, 1, 0, 0, 1, @indiaCountryId,1), 
("PAN Card", 1, 0, 1, 1, 0, 1, @indiaCountryId,1), 
("Passport", 1, 1, 1, 1, 0, 1, @indiaCountryId,1), 
("Ration Card", 1, 1, 1, 0, 0, 1, @indiaCountryId,1), 
("TAN", 1, 0, 0, 0, 0, 1, NULL,1), 
("TIN", 1, 0, 0, 0, 1, 1, NULL,1), 
("Voter's Identity Card", 1, 1, 1, 1, 1, 1, @indiaCountryId,1), 
("Bank Account Statement", 0, 1, 0, 0, 0, 1, @indiaCountryId,1), 
("Electricity Bill", 0, 1, 0, 0, 0, 1, @indiaCountryId,1), 
("Letter from Employer", 0, 1, 0, 0, 0, 1, @indiaCountryId,1), 
("Telephone Bill", 0, 1, 0, 0, 0, 1, @indiaCountryId,1),
("Udhyam Registration No.", 0, 0, 0, 0, 0, 1, @indiaCountryId,0);
UNLOCK TABLES;

-- Setting master values in variables for downstream usage
SELECT @casteMapTypeId := id FROM ClientMapTypeMaster WHERE name = 'Caste';
SELECT @insuCompanyMapTypeId := id FROM ClientMapTypeMaster WHERE name = 'Insurance Company';

--
-- Master table values for ClientMapMaster
--
LOCK TABLES ClientMapMaster WRITE;
DELETE FROM ClientMapMaster WHERE country_id IS NOT NULL;
INSERT INTO ClientMapMaster(map_type_id, country_id, name, ui_name, system_defined) VALUES
(@casteMapTypeId, @indiaCountryId, 'Scheduled Caste', 'Scheduled Caste', 1),
(@casteMapTypeId, @indiaCountryId, 'Scheduled Tribe', 'Scheduled Tribe', 1),
(@casteMapTypeId, @indiaCountryId, 'Other Backward Class', 'Other Backward Class', 1),
(@casteMapTypeId, @indiaCountryId, 'Backward Category', 'Backward Category', 1),
(@casteMapTypeId, @indiaCountryId, 'Other Category', 'Other Category', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'Bharti AXA General Insurance', 'Bharti AXA General Insurance', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'Chola MS General Insurance', 'Chola MS General Insurance', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'HDFC ERGO General Insurance', 'HDFC ERGO General Insurance', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'ICICI Lombard General Insurance', 'ICICI Lombard General Insurance', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'National Insurance', 'National Insurance', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'Oriental Insurance', 'Oriental Insurance', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'Reliance General Insurance', 'Reliance General Insurance', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'Shriram General Insurance', 'Shriram General Insurance', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'The New India Assurance', 'The New India Assurance', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'United India Insurance', 'United India Insurance', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'Kotak Mahindra Old Mutual General Insurance', 'Kotak Mahindra Old Mutual General Insurance', 1),
(@insuCompanyMapTypeId, @indiaCountryId, 'Bajaj Allianz General Insurance', 'Bajaj Allianz General Insurance', 1);
UNLOCK TABLES;








