feat: implement master data module with initial entities, action builder configurations, and SQL seed script
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
[
|
||||
{
|
||||
"actionTypeCode": "HOTEL_ACCOMMODATION",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "hotel_tier",
|
||||
"fieldName": "Hotel Tier",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "hotel-tier",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Hotel Details",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "room_type",
|
||||
"fieldName": "Room Type",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "room-type",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Hotel Details",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "number_of_rooms",
|
||||
"fieldName": "Number of Rooms",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Hotel Details",
|
||||
"displayOrder": 3
|
||||
},
|
||||
{
|
||||
"fieldCode": "number_of_nights",
|
||||
"fieldName": "Number of Nights",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Hotel Details",
|
||||
"displayOrder": 4
|
||||
},
|
||||
{
|
||||
"fieldCode": "meal_included",
|
||||
"fieldName": "Meal Included",
|
||||
"fieldType": "multi_select",
|
||||
"lookupSource": "meal-type",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Hotel Details",
|
||||
"displayOrder": 5
|
||||
},
|
||||
{
|
||||
"fieldCode": "check_in_date",
|
||||
"fieldName": "Check-in Date",
|
||||
"fieldType": "date",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Schedule",
|
||||
"displayOrder": 6
|
||||
},
|
||||
{
|
||||
"fieldCode": "check_out_date",
|
||||
"fieldName": "Check-out Date",
|
||||
"fieldType": "date",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Schedule",
|
||||
"displayOrder": 7
|
||||
},
|
||||
{
|
||||
"fieldCode": "preferred_hotel_chain",
|
||||
"fieldName": "Preferred Hotel Chain",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "hotel-chain",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Preferences",
|
||||
"displayOrder": 8
|
||||
},
|
||||
{
|
||||
"fieldCode": "maximum_budget",
|
||||
"fieldName": "Maximum Budget",
|
||||
"fieldType": "currency",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Preferences",
|
||||
"displayOrder": 9
|
||||
},
|
||||
{
|
||||
"fieldCode": "approval_required",
|
||||
"fieldName": "Approval Required",
|
||||
"fieldType": "switch",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Preferences",
|
||||
"displayOrder": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "AIRPORT_HOTEL",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "hotel_category",
|
||||
"fieldName": "Hotel Category",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "hotel-category",
|
||||
"isRequired": true,
|
||||
"width": "full",
|
||||
"section": "General Information",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "duration_hours",
|
||||
"fieldName": "Duration (Hours)",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "General Information",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "maximum_budget",
|
||||
"fieldName": "Maximum Budget",
|
||||
"fieldType": "currency",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "General Information",
|
||||
"displayOrder": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,142 @@
|
||||
[
|
||||
{
|
||||
"actionTypeCode": "REGULATORY_COMPENSATION",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "compensation_rule",
|
||||
"fieldName": "Compensation Rule",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "compensation-rule",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Compensation Rules",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "amount_type",
|
||||
"fieldName": "Amount Type",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "amount-type",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Compensation Rules",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "compensation_amount",
|
||||
"fieldName": "Compensation Amount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 3
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 4
|
||||
},
|
||||
{
|
||||
"fieldCode": "payment_method",
|
||||
"fieldName": "Payment Method",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "refund-method",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 5
|
||||
},
|
||||
{
|
||||
"fieldCode": "payment_due_within_days",
|
||||
"fieldName": "Payment Due Within (Days)",
|
||||
"fieldType": "number",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 6
|
||||
},
|
||||
{
|
||||
"fieldCode": "approval_required",
|
||||
"fieldName": "Approval Required",
|
||||
"fieldType": "switch",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Approval",
|
||||
"displayOrder": 7
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "AIRLINE_GOODWILL_CASH",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "goodwill_amount",
|
||||
"fieldName": "Goodwill Amount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Goodwill Details",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Goodwill Details",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "reason_code",
|
||||
"fieldName": "Reason Code",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "goodwill-reason",
|
||||
"isRequired": true,
|
||||
"width": "full",
|
||||
"section": "Goodwill Details",
|
||||
"displayOrder": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "EX_GRATIA_COMPENSATION",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "amount",
|
||||
"fieldName": "Amount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "approval_level",
|
||||
"fieldName": "Approval Level",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "approval-level",
|
||||
"isRequired": true,
|
||||
"width": "full",
|
||||
"section": "Approval",
|
||||
"displayOrder": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,106 @@
|
||||
[
|
||||
{
|
||||
"actionTypeCode": "AWARD_MILES",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "miles_to_credit",
|
||||
"fieldName": "Miles to Credit",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Loyalty",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "expiry_date",
|
||||
"fieldName": "Expiry",
|
||||
"fieldType": "date",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Loyalty",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "loyalty_program",
|
||||
"fieldName": "Loyalty Program",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "loyalty-program",
|
||||
"isRequired": true,
|
||||
"width": "full",
|
||||
"section": "Loyalty",
|
||||
"displayOrder": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "BONUS_MILES",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "bonus_miles",
|
||||
"fieldName": "Bonus Miles",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Loyalty",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "promotion_code",
|
||||
"fieldName": "Promotion Code",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "promotion-code",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Loyalty",
|
||||
"displayOrder": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "TIER_POINTS",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "tier_points",
|
||||
"fieldName": "Tier Points",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Loyalty",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "validity_date",
|
||||
"fieldName": "Validity",
|
||||
"fieldType": "date",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Loyalty",
|
||||
"displayOrder": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "TIER_UPGRADE",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "target_tier",
|
||||
"fieldName": "Target Tier",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "membership-tier",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Loyalty",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "upgrade_duration_months",
|
||||
"fieldName": "Upgrade Duration (Months)",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Loyalty",
|
||||
"displayOrder": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,111 @@
|
||||
[
|
||||
{
|
||||
"actionTypeCode": "MEAL_VOUCHER",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "voucher_amount",
|
||||
"fieldName": "Voucher Amount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "General Information",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "General Information",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "meal_type",
|
||||
"fieldName": "Meal Type",
|
||||
"fieldType": "multi_select",
|
||||
"lookupSource": "meal-type",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "General Information",
|
||||
"displayOrder": 3
|
||||
},
|
||||
{
|
||||
"fieldCode": "validity_hours",
|
||||
"fieldName": "Validity (Hours)",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Restrictions",
|
||||
"displayOrder": 4
|
||||
},
|
||||
{
|
||||
"fieldCode": "airport_restriction",
|
||||
"fieldName": "Airport Restriction",
|
||||
"fieldType": "multi_select",
|
||||
"lookupSource": "airport-restriction",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Restrictions",
|
||||
"displayOrder": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "RESTAURANT_VOUCHER",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "partner_restaurant",
|
||||
"fieldName": "Partner Restaurant",
|
||||
"fieldType": "dropdown",
|
||||
"isRequired": true,
|
||||
"width": "full",
|
||||
"section": "General Information",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "voucher_value",
|
||||
"fieldName": "Voucher Value",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "General Information",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "expiry_date",
|
||||
"fieldName": "Expiry",
|
||||
"fieldType": "date",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Restrictions",
|
||||
"displayOrder": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "REFRESHMENT_COUPON",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "coupon_amount",
|
||||
"fieldName": "Coupon Amount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "General Information",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "General Information",
|
||||
"displayOrder": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,354 @@
|
||||
[
|
||||
{
|
||||
"actionTypeCode": "FULL_TICKET_REFUND",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "refund_basis",
|
||||
"fieldName": "Refund Basis",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "refund-basis",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance / Payment Gateway",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "amount_type",
|
||||
"fieldName": "Amount Type",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "amount-type",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance / Payment Gateway",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_amount",
|
||||
"fieldName": "Refund Amount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance / Payment Gateway",
|
||||
"displayOrder": 3
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance / Payment Gateway",
|
||||
"displayOrder": 4
|
||||
},
|
||||
{
|
||||
"fieldCode": "maximum_refund_limit",
|
||||
"fieldName": "Maximum Refund Limit",
|
||||
"fieldType": "currency",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Finance / Payment Gateway",
|
||||
"displayOrder": 5
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_method",
|
||||
"fieldName": "Refund Method",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "refund-method",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance / Payment Gateway",
|
||||
"displayOrder": 6
|
||||
},
|
||||
{
|
||||
"fieldCode": "approval_required",
|
||||
"fieldName": "Approval Required",
|
||||
"fieldType": "switch",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Finance / Payment Gateway",
|
||||
"displayOrder": 7
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "PARTIAL_TICKET_REFUND",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "refund_component",
|
||||
"fieldName": "Refund Component",
|
||||
"fieldType": "multi_select",
|
||||
"lookupSource": "refund-component",
|
||||
"isRequired": true,
|
||||
"width": "full",
|
||||
"section": "Finance",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "amount_type",
|
||||
"fieldName": "Amount Type",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "amount-type",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_percentage",
|
||||
"fieldName": "Refund Percentage",
|
||||
"fieldType": "number",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 3
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_amount",
|
||||
"fieldName": "Refund Amount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 4
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 5
|
||||
},
|
||||
{
|
||||
"fieldCode": "maximum_refund_limit",
|
||||
"fieldName": "Maximum Refund Limit",
|
||||
"fieldType": "currency",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 6
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_method",
|
||||
"fieldName": "Refund Method",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "refund-method",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Finance",
|
||||
"displayOrder": 7
|
||||
},
|
||||
{
|
||||
"fieldCode": "approval_required",
|
||||
"fieldName": "Approval Required",
|
||||
"fieldType": "switch",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Finance",
|
||||
"displayOrder": 8
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "TAX_REFUND",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "tax_type",
|
||||
"fieldName": "Tax Type",
|
||||
"fieldType": "multi_select",
|
||||
"lookupSource": "tax-type",
|
||||
"isRequired": true,
|
||||
"width": "full",
|
||||
"section": "Amount Type",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "amount_type",
|
||||
"fieldName": "Amount Type",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "amount-type",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Amount",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_amount",
|
||||
"fieldName": "Refund Amount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Amount",
|
||||
"displayOrder": 3
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Method",
|
||||
"displayOrder": 4
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_method",
|
||||
"fieldName": "Refund Method",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "refund-method",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Method",
|
||||
"displayOrder": 5
|
||||
},
|
||||
{
|
||||
"fieldCode": "approval_required",
|
||||
"fieldName": "Approval Required",
|
||||
"fieldType": "switch",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Approval Required",
|
||||
"displayOrder": 6
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "ANCILLARY_REFUND",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "ancillary_type",
|
||||
"fieldName": "Ancillary Type",
|
||||
"fieldType": "multi_select",
|
||||
"lookupSource": "ancillary-purchase",
|
||||
"isRequired": true,
|
||||
"width": "full",
|
||||
"section": "Amount Type",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "amount_type",
|
||||
"fieldName": "Amount Type",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "amount-type",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Amount",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_amount",
|
||||
"fieldName": "Refund Amount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Amount",
|
||||
"displayOrder": 3
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Method",
|
||||
"displayOrder": 4
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_method",
|
||||
"fieldName": "Refund Method",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "refund-method",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Method",
|
||||
"displayOrder": 5
|
||||
},
|
||||
{
|
||||
"fieldCode": "approval_required",
|
||||
"fieldName": "Approval Required",
|
||||
"fieldType": "switch",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Approval Required",
|
||||
"displayOrder": 6
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "BAGGAGE_FEE_REFUND",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "baggage_type",
|
||||
"fieldName": "Baggage Type",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "baggage-type",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Basis",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_basis",
|
||||
"fieldName": "Refund Basis",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "refund-basis",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Basis",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "amount_type",
|
||||
"fieldName": "Amount Type",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "amount-type",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Amount",
|
||||
"displayOrder": 3
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_amount",
|
||||
"fieldName": "Refund Amount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Amount",
|
||||
"displayOrder": 4
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Method",
|
||||
"displayOrder": 5
|
||||
},
|
||||
{
|
||||
"fieldCode": "refund_method",
|
||||
"fieldName": "Refund Method",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "refund-method",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Refund Method",
|
||||
"displayOrder": 6
|
||||
},
|
||||
{
|
||||
"fieldCode": "approval_required",
|
||||
"fieldName": "Approval Required",
|
||||
"fieldType": "switch",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Approval Required",
|
||||
"displayOrder": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,151 @@
|
||||
[
|
||||
{
|
||||
"actionTypeCode": "TAXI",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "maximum_fare",
|
||||
"fieldName": "Maximum Fare",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Ground Transport",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Ground Transport",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "pickup_radius_km",
|
||||
"fieldName": "Pickup Radius (Kilometers)",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Ground Transport",
|
||||
"displayOrder": 3
|
||||
},
|
||||
{
|
||||
"fieldCode": "destination_type",
|
||||
"fieldName": "Destination Type",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "destination-type",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Ground Transport",
|
||||
"displayOrder": 4
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "AIRPORT_TRANSFER",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "vehicle_type",
|
||||
"fieldName": "Vehicle Type",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "vehicle-category",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Ground Transport",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "maximum_distance_km",
|
||||
"fieldName": "Maximum Distance (Kilometers)",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Ground Transport",
|
||||
"displayOrder": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "BUS_TRANSFER",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "route",
|
||||
"fieldName": "Route",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "route",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Ground Transport",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "number_of_passengers",
|
||||
"fieldName": "Number of Passengers",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Ground Transport",
|
||||
"displayOrder": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "TRAIN_TICKET",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "ticket_class",
|
||||
"fieldName": "Ticket Class",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "cabin-class",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Partner API",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "maximum_fare",
|
||||
"fieldName": "Maximum Fare",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Partner API",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "full",
|
||||
"section": "Partner API",
|
||||
"displayOrder": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "CHAUFFEUR_SERVICE",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "vehicle_category",
|
||||
"fieldName": "Vehicle Category",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "vehicle-category",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Partner API",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "service_radius_km",
|
||||
"fieldName": "Service Radius (Kilometers)",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Partner API",
|
||||
"displayOrder": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,172 @@
|
||||
[
|
||||
{
|
||||
"actionTypeCode": "TRAVEL_VOUCHER",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "voucher_value",
|
||||
"fieldName": "Voucher Value",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Voucher Details",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Voucher Details",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "validity_months",
|
||||
"fieldName": "Validity (Months)",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Voucher Rules",
|
||||
"displayOrder": 3
|
||||
},
|
||||
{
|
||||
"fieldCode": "transferable",
|
||||
"fieldName": "Transferable",
|
||||
"fieldType": "switch",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Voucher Rules",
|
||||
"displayOrder": 4
|
||||
},
|
||||
{
|
||||
"fieldCode": "applicable_routes",
|
||||
"fieldName": "Applicable Routes",
|
||||
"fieldType": "multi_select",
|
||||
"lookupSource": "flight-type",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Voucher Rules",
|
||||
"displayOrder": 5
|
||||
},
|
||||
{
|
||||
"fieldCode": "fare_classes",
|
||||
"fieldName": "Fare Classes",
|
||||
"fieldType": "multi_select",
|
||||
"lookupSource": "cabin-class",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Voucher Rules",
|
||||
"displayOrder": 6
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "FUTURE_TRAVEL_CREDIT",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "credit_amount",
|
||||
"fieldName": "Credit Amount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Credit Details",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "currency",
|
||||
"fieldName": "Currency",
|
||||
"fieldType": "dropdown",
|
||||
"lookupSource": "currency",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Credit Details",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "expiry_date",
|
||||
"fieldName": "Expiry Date",
|
||||
"fieldType": "date",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Credit Rules",
|
||||
"displayOrder": 3
|
||||
},
|
||||
{
|
||||
"fieldCode": "eligible_fare_types",
|
||||
"fieldName": "Eligible Fare Types",
|
||||
"fieldType": "multi_select",
|
||||
"lookupSource": "eligible-fare-type",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Credit Rules",
|
||||
"displayOrder": 4
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "PROMO_CODE",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "code_value",
|
||||
"fieldName": "Code Value",
|
||||
"fieldType": "text",
|
||||
"isRequired": true,
|
||||
"width": "full",
|
||||
"section": "Promo Details",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "validity_date",
|
||||
"fieldName": "Validity",
|
||||
"fieldType": "date",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Promo Rules",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "applicable_products",
|
||||
"fieldName": "Applicable Products",
|
||||
"fieldType": "multi_select",
|
||||
"lookupSource": "applicable-product",
|
||||
"isRequired": false,
|
||||
"width": "full",
|
||||
"section": "Promo Rules",
|
||||
"displayOrder": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"actionTypeCode": "DISCOUNT_COUPON",
|
||||
"fields": [
|
||||
{
|
||||
"fieldCode": "discount_percentage",
|
||||
"fieldName": "Discount Percentage",
|
||||
"fieldType": "number",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Discount Details",
|
||||
"displayOrder": 1
|
||||
},
|
||||
{
|
||||
"fieldCode": "maximum_discount",
|
||||
"fieldName": "Maximum Discount",
|
||||
"fieldType": "currency",
|
||||
"isRequired": false,
|
||||
"width": "half",
|
||||
"section": "Discount Details",
|
||||
"displayOrder": 2
|
||||
},
|
||||
{
|
||||
"fieldCode": "expiry_date",
|
||||
"fieldName": "Expiry",
|
||||
"fieldType": "date",
|
||||
"isRequired": true,
|
||||
"width": "half",
|
||||
"section": "Discount Rules",
|
||||
"displayOrder": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -858,3 +858,82 @@ SELECT label, value, true FROM (VALUES
|
||||
('Family', 'family')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters_lookup.tbl_room_types WHERE masters_lookup.tbl_room_types.value = t.value);
|
||||
|
||||
-- 54. Hotel Tiers
|
||||
|
||||
INSERT INTO masters_lookup.tbl_hotel_tiers (label, value, "isActive")
|
||||
SELECT label, value, true FROM (VALUES
|
||||
('3 Star', '3-star'),
|
||||
('4 Star', '4-star'),
|
||||
('5 Star', '5-star')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters_lookup.tbl_hotel_tiers WHERE masters_lookup.tbl_hotel_tiers.value = t.value);
|
||||
|
||||
-- 55. Hotel Categories
|
||||
|
||||
INSERT INTO masters_lookup.tbl_hotel_categories (label, value, "isActive")
|
||||
SELECT label, value, true FROM (VALUES
|
||||
('Airport Hotel', 'airport-hotel'),
|
||||
('Transit Hotel', 'transit-hotel')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters_lookup.tbl_hotel_categories WHERE masters_lookup.tbl_hotel_categories.value = t.value);
|
||||
|
||||
-- 56. Hotel Chains
|
||||
|
||||
INSERT INTO masters_lookup.tbl_hotel_chains (label, value, "isActive")
|
||||
SELECT label, value, true FROM (VALUES
|
||||
('Hilton', 'hilton'),
|
||||
('Marriott', 'marriott'),
|
||||
('IHG', 'ihg'),
|
||||
('Hyatt', 'hyatt'),
|
||||
('Radisson', 'radisson')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters_lookup.tbl_hotel_chains WHERE masters_lookup.tbl_hotel_chains.value = t.value);
|
||||
|
||||
-- 57. Loyalty Programs
|
||||
INSERT INTO masters_lookup.tbl_loyalty_programs (label, value, "isActive")
|
||||
SELECT label, value, true FROM (VALUES
|
||||
('AeroMiles', 'aeromiles'),
|
||||
('SkyRewards', 'skyrewards'),
|
||||
('StarAlliance', 'staralliance')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters_lookup.tbl_loyalty_programs WHERE masters_lookup.tbl_loyalty_programs.value = t.value);
|
||||
|
||||
-- 58. Promotion Codes
|
||||
INSERT INTO masters_lookup.tbl_promotion_codes (label, value, "isActive")
|
||||
SELECT label, value, true FROM (VALUES
|
||||
('SUMMER2026', 'summer2026'),
|
||||
('APOLOGY10', 'apology10'),
|
||||
('FESTIVE25', 'festive25')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters_lookup.tbl_promotion_codes WHERE masters_lookup.tbl_promotion_codes.value = t.value);
|
||||
|
||||
-- 59. Goodwill Reasons
|
||||
INSERT INTO masters_lookup.tbl_goodwill_reasons (label, value, "isActive")
|
||||
SELECT label, value, true FROM (VALUES
|
||||
('Service Failure', 'service-failure'),
|
||||
('Customer Retention', 'customer-retention'),
|
||||
('Operational Delay', 'operational-delay')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters_lookup.tbl_goodwill_reasons WHERE masters_lookup.tbl_goodwill_reasons.value = t.value);
|
||||
|
||||
-- 60. Routes
|
||||
INSERT INTO masters_lookup.tbl_routes (label, value, "isActive")
|
||||
SELECT label, value, true FROM (VALUES
|
||||
('Airport to City Center', 'airport-city'),
|
||||
('City Center to Airport', 'city-airport'),
|
||||
('Airport to Terminal 2', 'airport-t2')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters_lookup.tbl_routes WHERE masters_lookup.tbl_routes.value = t.value);
|
||||
|
||||
-- 61. Refund Components
|
||||
INSERT INTO masters_lookup.tbl_refund_components (label, value, "isActive")
|
||||
SELECT label, value, true FROM (VALUES
|
||||
('Base Fare', 'base-fare'),
|
||||
('Taxes', 'taxes'),
|
||||
('Ancillary', 'ancillary'),
|
||||
('Seat Fee', 'seat-fee'),
|
||||
('Baggage Fee', 'baggage-fee'),
|
||||
('Service Fee', 'service-fee')
|
||||
) AS t(label, value)
|
||||
WHERE NOT EXISTS (SELECT 1 FROM masters_lookup.tbl_refund_components WHERE masters_lookup.tbl_refund_components.value = t.value);
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity({ name: 'tbl_goodwill_reasons', schema: 'masters_lookup' })
|
||||
export class GoodwillReason {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Column()
|
||||
label!: string;
|
||||
|
||||
@Column()
|
||||
value!: string;
|
||||
|
||||
@Column({ default: true })
|
||||
isActive!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt!: Date;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity({ name: 'tbl_hotel_categories', schema: 'masters_lookup' })
|
||||
export class HotelCategory {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Column()
|
||||
label!: string;
|
||||
|
||||
@Column()
|
||||
value!: string;
|
||||
|
||||
@Column({ default: true })
|
||||
isActive!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt!: Date;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity({ name: 'tbl_hotel_chains', schema: 'masters_lookup' })
|
||||
export class HotelChain {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Column()
|
||||
label!: string;
|
||||
|
||||
@Column()
|
||||
value!: string;
|
||||
|
||||
@Column({ default: true })
|
||||
isActive!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt!: Date;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity({ name: 'tbl_hotel_tiers', schema: 'masters_lookup' })
|
||||
export class HotelTier {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Column()
|
||||
label!: string;
|
||||
|
||||
@Column()
|
||||
value!: string;
|
||||
|
||||
@Column({ default: true })
|
||||
isActive!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt!: Date;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity({ name: 'tbl_loyalty_programs', schema: 'masters_lookup' })
|
||||
export class LoyaltyProgram {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Column()
|
||||
label!: string;
|
||||
|
||||
@Column()
|
||||
value!: string;
|
||||
|
||||
@Column({ default: true })
|
||||
isActive!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt!: Date;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity({ name: 'tbl_promotion_codes', schema: 'masters_lookup' })
|
||||
export class PromotionCode {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Column()
|
||||
label!: string;
|
||||
|
||||
@Column()
|
||||
value!: string;
|
||||
|
||||
@Column({ default: true })
|
||||
isActive!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt!: Date;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity({ name: 'tbl_refund_components', schema: 'masters_lookup' })
|
||||
export class RefundComponent {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Column()
|
||||
label!: string;
|
||||
|
||||
@Column()
|
||||
value!: string;
|
||||
|
||||
@Column({ default: true })
|
||||
isActive!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt!: Date;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity({ name: 'tbl_routes', schema: 'masters_lookup' })
|
||||
export class Route {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Column()
|
||||
label!: string;
|
||||
|
||||
@Column()
|
||||
value!: string;
|
||||
|
||||
@Column({ default: true })
|
||||
isActive!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt!: Date;
|
||||
}
|
||||
@@ -60,6 +60,14 @@ import { SeatCategory } from './entities/seat-category.entity';
|
||||
import { CompensationBasis } from './entities/compensation-basis.entity';
|
||||
import { TaxType } from './entities/tax-type.entity';
|
||||
import { RoomType } from './entities/room-type.entity';
|
||||
import { HotelTier } from './entities/hotel-tier.entity';
|
||||
import { HotelCategory } from './entities/hotel-category.entity';
|
||||
import { HotelChain } from './entities/hotel-chain.entity';
|
||||
import { LoyaltyProgram } from './entities/loyalty-program.entity';
|
||||
import { PromotionCode } from './entities/promotion-code.entity';
|
||||
import { GoodwillReason } from './entities/goodwill-reason.entity';
|
||||
import { Route } from './entities/route.entity';
|
||||
import { RefundComponent } from './entities/refund-component.entity';
|
||||
|
||||
import { ConditionGroup } from './entities/condition-group.entity';
|
||||
import { ConditionField } from './entities/condition-field.entity';
|
||||
@@ -124,6 +132,14 @@ import { RuleCategoryGroup } from './entities/rule-category-group.entity';
|
||||
CompensationBasis,
|
||||
TaxType,
|
||||
RoomType,
|
||||
HotelTier,
|
||||
HotelCategory,
|
||||
HotelChain,
|
||||
LoyaltyProgram,
|
||||
PromotionCode,
|
||||
GoodwillReason,
|
||||
Route,
|
||||
RefundComponent,
|
||||
ConditionGroup,
|
||||
ConditionField,
|
||||
RuleCategoryGroup,
|
||||
|
||||
@@ -61,6 +61,14 @@ import { SeatCategory } from './entities/seat-category.entity';
|
||||
import { CompensationBasis } from './entities/compensation-basis.entity';
|
||||
import { TaxType } from './entities/tax-type.entity';
|
||||
import { RoomType } from './entities/room-type.entity';
|
||||
import { HotelTier } from './entities/hotel-tier.entity';
|
||||
import { HotelCategory } from './entities/hotel-category.entity';
|
||||
import { HotelChain } from './entities/hotel-chain.entity';
|
||||
import { LoyaltyProgram } from './entities/loyalty-program.entity';
|
||||
import { PromotionCode } from './entities/promotion-code.entity';
|
||||
import { GoodwillReason } from './entities/goodwill-reason.entity';
|
||||
import { Route } from './entities/route.entity';
|
||||
import { RefundComponent } from './entities/refund-component.entity';
|
||||
import { ConditionGroup } from './entities/condition-group.entity';
|
||||
import { ConditionField } from './entities/condition-field.entity';
|
||||
import { RuleCategoryGroup } from './entities/rule-category-group.entity';
|
||||
@@ -136,6 +144,14 @@ export class MasterDataService implements OnModuleInit {
|
||||
@InjectRepository(CompensationBasis) private compensationBasisRepo: Repository<CompensationBasis>,
|
||||
@InjectRepository(TaxType) private taxTypeRepo: Repository<TaxType>,
|
||||
@InjectRepository(RoomType) private roomTypeRepo: Repository<RoomType>,
|
||||
@InjectRepository(HotelTier) private hotelTierRepo: Repository<HotelTier>,
|
||||
@InjectRepository(HotelCategory) private hotelCategoryRepo: Repository<HotelCategory>,
|
||||
@InjectRepository(HotelChain) private hotelChainRepo: Repository<HotelChain>,
|
||||
@InjectRepository(LoyaltyProgram) private loyaltyProgramRepo: Repository<LoyaltyProgram>,
|
||||
@InjectRepository(PromotionCode) private promotionCodeRepo: Repository<PromotionCode>,
|
||||
@InjectRepository(GoodwillReason) private goodwillReasonRepo: Repository<GoodwillReason>,
|
||||
@InjectRepository(Route) private routeRepo: Repository<Route>,
|
||||
@InjectRepository(RefundComponent) private refundComponentRepo: Repository<RefundComponent>,
|
||||
@InjectRepository(ConditionGroup) private conditionGroupRepo: Repository<ConditionGroup>,
|
||||
@InjectRepository(ConditionField) private conditionFieldRepo: Repository<ConditionField>,
|
||||
@InjectRepository(RuleCategoryGroup) private ruleCategoryGroupRepo: Repository<RuleCategoryGroup>,
|
||||
@@ -369,6 +385,46 @@ export class MasterDataService implements OnModuleInit {
|
||||
case 'TBL_ROOM_TYPES':
|
||||
return this.roomTypeRepo;
|
||||
|
||||
case 'HOTEL_TIER':
|
||||
case 'HOTEL_TIERS':
|
||||
case 'TBL_HOTEL_TIERS':
|
||||
return this.hotelTierRepo;
|
||||
|
||||
case 'HOTEL_CATEGORY':
|
||||
case 'HOTEL_CATEGORIES':
|
||||
case 'TBL_HOTEL_CATEGORIES':
|
||||
return this.hotelCategoryRepo;
|
||||
|
||||
case 'HOTEL_CHAIN':
|
||||
case 'HOTEL_CHAINS':
|
||||
case 'TBL_HOTEL_CHAINS':
|
||||
return this.hotelChainRepo;
|
||||
|
||||
case 'LOYALTY_PROGRAM':
|
||||
case 'LOYALTY_PROGRAMS':
|
||||
case 'TBL_LOYALTY_PROGRAMS':
|
||||
return this.loyaltyProgramRepo;
|
||||
|
||||
case 'PROMOTION_CODE':
|
||||
case 'PROMOTION_CODES':
|
||||
case 'TBL_PROMOTION_CODES':
|
||||
return this.promotionCodeRepo;
|
||||
|
||||
case 'GOODWILL_REASON':
|
||||
case 'GOODWILL_REASONS':
|
||||
case 'TBL_GOODWILL_REASONS':
|
||||
return this.goodwillReasonRepo;
|
||||
|
||||
case 'ROUTE':
|
||||
case 'ROUTES':
|
||||
case 'TBL_ROUTES':
|
||||
return this.routeRepo;
|
||||
|
||||
case 'REFUND_COMPONENT':
|
||||
case 'REFUND_COMPONENTS':
|
||||
case 'TBL_REFUND_COMPONENTS':
|
||||
return this.refundComponentRepo;
|
||||
|
||||
default:
|
||||
throw new BadRequestException(`Invalid category: ${category}`);
|
||||
}
|
||||
@@ -471,6 +527,14 @@ export class MasterDataService implements OnModuleInit {
|
||||
{ code: 'compensation-basis', name: 'Compensation Bases', tableName: 'tbl_compensation_bases', description: 'Basis for calculating compensation' },
|
||||
{ code: 'tax-type', name: 'Tax Types', tableName: 'tbl_tax_types', description: 'Aviation and booking tax types' },
|
||||
{ code: 'room-type', name: 'Room Types', tableName: 'tbl_room_types', description: 'Hotel accommodation room types' },
|
||||
{ code: 'hotel-tier', name: 'Hotel Tiers', tableName: 'tbl_hotel_tiers', description: 'Hotel star ratings' },
|
||||
{ code: 'hotel-category', name: 'Hotel Categories', tableName: 'tbl_hotel_categories', description: 'Hotel types like Airport, Transit' },
|
||||
{ code: 'hotel-chain', name: 'Hotel Chains', tableName: 'tbl_hotel_chains', description: 'Partner hotel chains' },
|
||||
{ code: 'loyalty-program', name: 'Loyalty Programs', tableName: 'tbl_loyalty_programs', description: 'Airline loyalty and frequent flyer programs' },
|
||||
{ code: 'promotion-code', name: 'Promotion Codes', tableName: 'tbl_promotion_codes', description: 'Special promotion and discount codes' },
|
||||
{ code: 'goodwill-reason', name: 'Goodwill Reasons', tableName: 'tbl_goodwill_reasons', description: 'Reasons for providing goodwill cash' },
|
||||
{ code: 'route', name: 'Routes', tableName: 'tbl_routes', description: 'Configured transport routes' },
|
||||
{ code: 'refund-component', name: 'Refund Components', tableName: 'tbl_refund_components', description: 'Breakdown of ticket price components for refund' },
|
||||
];
|
||||
}
|
||||
|
||||
@@ -905,6 +969,7 @@ export class MasterDataService implements OnModuleInit {
|
||||
// --- Database Seeding ---
|
||||
async onModuleInit() {
|
||||
await this.seedData();
|
||||
await this.seedActionBuilderFields();
|
||||
}
|
||||
|
||||
async seedData(): Promise<void> {
|
||||
@@ -921,4 +986,58 @@ export class MasterDataService implements OnModuleInit {
|
||||
this.logger.error('Failed to seed master data from SQL file:', error);
|
||||
}
|
||||
}
|
||||
|
||||
async seedActionBuilderFields(): Promise<void> {
|
||||
try {
|
||||
const seedDir = path.join(process.cwd(), 'database', 'action-builder');
|
||||
if (!fs.existsSync(seedDir)) {
|
||||
this.logger.log(`Action builder seed directory not found at ${seedDir}. Skipping...`);
|
||||
return;
|
||||
}
|
||||
|
||||
const files = fs.readdirSync(seedDir).filter(f => f.endsWith('.json'));
|
||||
if (files.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.logger.log(`Found ${files.length} action builder seed file(s). Seeding fields...`);
|
||||
|
||||
for (const file of files) {
|
||||
const filePath = path.join(seedDir, file);
|
||||
const fileContent = fs.readFileSync(filePath, 'utf8');
|
||||
const seedData = JSON.parse(fileContent);
|
||||
|
||||
for (const actionConfig of seedData) {
|
||||
const actionType = await this.actionTypeRepo.findOne({
|
||||
where: { code: actionConfig.actionTypeCode, isActive: true }
|
||||
});
|
||||
|
||||
if (!actionType) {
|
||||
this.logger.warn(`Action Type ${actionConfig.actionTypeCode} not found. Skipping fields.`);
|
||||
continue;
|
||||
}
|
||||
|
||||
for (const field of actionConfig.fields) {
|
||||
const existingField = await this.fieldDefinitionRepo.findOne({
|
||||
where: { actionTypeId: actionType.id, fieldCode: field.fieldCode }
|
||||
});
|
||||
|
||||
if (existingField) {
|
||||
Object.assign(existingField, field);
|
||||
await this.fieldDefinitionRepo.save(existingField);
|
||||
} else {
|
||||
const newField = this.fieldDefinitionRepo.create({
|
||||
...field,
|
||||
actionTypeId: actionType.id
|
||||
});
|
||||
await this.fieldDefinitionRepo.save(newField);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.logger.log('Action builder configuration fields seeded successfully.');
|
||||
} catch (error) {
|
||||
this.logger.error('Failed to seed action builder fields:', error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user