feat: implement VehicleCategory entity and master data module support
This commit is contained in:
@@ -268,7 +268,9 @@ SELECT code, name, "tableName", description, "displayOrder", true FROM (VALUES
|
||||
('eligible-fare-type', 'Eligible Fare Type', 'tbl_eligible_fare_types', 'Eligible Fare Type master', 38),
|
||||
('applicable-product', 'Applicable Product', 'tbl_applicable_products', 'Applicable Product master', 39),
|
||||
('meal-type', 'Meal Type', 'tbl_meal_types', 'Meal Type master', 40),
|
||||
('airport-restriction', 'Airport Restriction', 'tbl_airport_restrictions', 'Airport Restriction master', 41)
|
||||
('airport-restriction', 'Airport Restriction', 'tbl_airport_restrictions', 'Airport Restriction master', 41),
|
||||
('destination-type', 'Destination Type', 'tbl_destination_types', 'Destination Type master', 42),
|
||||
('vehicle-category', 'Vehicle Category', 'tbl_vehicle_categories', 'Vehicle Category master', 43)
|
||||
) AS t(code, name, "tableName", description, "displayOrder")
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters.tbl_rules_categories WHERE masters.tbl_rules_categories.code = t.code);
|
||||
|
||||
@@ -316,7 +318,9 @@ FROM (VALUES
|
||||
('eligible-fare-type', 'tbl_eligible_fare_types'),
|
||||
('applicable-product', 'tbl_applicable_products'),
|
||||
('meal-type', 'tbl_meal_types'),
|
||||
('airport-restriction', 'tbl_airport_restrictions')
|
||||
('airport-restriction', 'tbl_airport_restrictions'),
|
||||
('destination-type', 'tbl_destination_types'),
|
||||
('vehicle-category', 'tbl_vehicle_categories')
|
||||
) AS v(code, "tableName")
|
||||
WHERE c.code = v.code AND (c."tableName" IS NULL OR c."tableName" != v."tableName");
|
||||
|
||||
@@ -714,3 +718,22 @@ SELECT label, value, true FROM (VALUES
|
||||
('Any Airport', 'any-airport')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters.tbl_airport_restrictions WHERE masters.tbl_airport_restrictions.value = t.value);
|
||||
|
||||
-- 45. Destination Types
|
||||
INSERT INTO masters.tbl_destination_types (label, value, "isActive")
|
||||
SELECT label, value, true FROM (VALUES
|
||||
('Home', 'home'),
|
||||
('Hotel', 'hotel'),
|
||||
('Airport', 'airport'),
|
||||
('City Center', 'city-center')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters.tbl_destination_types WHERE masters.tbl_destination_types.value = t.value);
|
||||
|
||||
-- 46. Vehicle Categories
|
||||
INSERT INTO masters.tbl_vehicle_categories (label, value, "isActive")
|
||||
SELECT label, value, true FROM (VALUES
|
||||
('Executive Sedan', 'executive-sedan'),
|
||||
('Luxury SUV', 'luxury-suv'),
|
||||
('Premium Van', 'premium-van')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters.tbl_vehicle_categories WHERE masters.tbl_vehicle_categories.value = t.value);
|
||||
|
||||
Reference in New Issue
Block a user