diff --git a/app/enums/Currency.js b/app/enums/Currency.js new file mode 100644 index 0000000..66b4f94 --- /dev/null +++ b/app/enums/Currency.js @@ -0,0 +1,20 @@ +/** + * Currency Enum + * Currency IDs used in the backend + */ +const Currency = Object.freeze({ + SYP: 1, + USD: 2, +}); + +const CurrencyLabels = Object.freeze({ + [Currency.SYP]: 'ليرة سورية', + [Currency.USD]: 'دولار أمريكي', +}); + +const CurrencySymbols = Object.freeze({ + [Currency.SYP]: 'SYP', + [Currency.USD]: 'USD', +}); + +export { Currency, CurrencyLabels, CurrencySymbols }; diff --git a/app/enums/PropertyService.js b/app/enums/PropertyService.js new file mode 100644 index 0000000..8735a83 --- /dev/null +++ b/app/enums/PropertyService.js @@ -0,0 +1,41 @@ +/** + * PropertyService Enum + * Services available at the property + * Used in detailsJSON.services array + */ +const PropertyService = Object.freeze({ + ELECTRICITY: 'Electricity', + INTERNET: 'Internet', + HEATING: 'Heating', + WATER: 'Water', + POOL: 'Pool', + PRIVATE_GARDEN: 'PrivateGarden', + PARKING: 'Parking', + SECURITY_247: 'Security247', + CENTRAL_HEATING: 'CentralHeating', + CENTRAL_AIR_CONDITIONING: 'CentralAirConditioning', + EQUIPPED_KITCHEN: 'EquippedKitchen', + MAIDS_ROOM: 'MaidsRoom', + ELEVATOR: 'Elevator', +}); + +const PropertyServiceLabels = Object.freeze({ + [PropertyService.ELECTRICITY]: 'كهرباء', + [PropertyService.INTERNET]: 'إنترنت', + [PropertyService.HEATING]: 'تدفئة', + [PropertyService.WATER]: 'ماء', + [PropertyService.POOL]: 'مسبح', + [PropertyService.PRIVATE_GARDEN]: 'حديقة خاصة', + [PropertyService.PARKING]: 'موقف سيارات', + [PropertyService.SECURITY_247]: 'حراسة 24 ساعة', + [PropertyService.CENTRAL_HEATING]: 'تدفئة مركزية', + [PropertyService.CENTRAL_AIR_CONDITIONING]: 'تكييف مركزي', + [PropertyService.EQUIPPED_KITCHEN]: 'مطبخ مجهز', + [PropertyService.MAIDS_ROOM]: 'غرفة خادمة', + [PropertyService.ELEVATOR]: 'مصعد', +}); + +// All services as array +const PropertyServicesList = Object.freeze(Object.values(PropertyService)); + +export { PropertyService, PropertyServiceLabels, PropertyServicesList }; diff --git a/app/enums/PropertyTerm.js b/app/enums/PropertyTerm.js new file mode 100644 index 0000000..36b7524 --- /dev/null +++ b/app/enums/PropertyTerm.js @@ -0,0 +1,21 @@ +/** + * PropertyTerm Enum + * Usage terms/conditions for the property + * Used in detailsJSON.terms array + */ +const PropertyTerm = Object.freeze({ + NO_SMOKING: 'NoSmoking', + NO_ANIMALS: 'NoAnimals', + NO_PARTIES: 'NoParties', +}); + +const PropertyTermLabels = Object.freeze({ + [PropertyTerm.NO_SMOKING]: 'ممنوع التدخين', + [PropertyTerm.NO_ANIMALS]: 'ممنوع الحيوانات', + [PropertyTerm.NO_PARTIES]: 'ممنوع الحفلات', +}); + +// All terms as array +const PropertyTermsList = Object.freeze(Object.values(PropertyTerm)); + +export { PropertyTerm, PropertyTermLabels, PropertyTermsList }; diff --git a/app/enums/RentPropertyCondition.js b/app/enums/RentPropertyCondition.js new file mode 100644 index 0000000..7a9c0af --- /dev/null +++ b/app/enums/RentPropertyCondition.js @@ -0,0 +1,16 @@ +/** + * RentPropertyCondition Enum + * Furniture condition of the property + * Sent as `propertyType` field in API + */ +const RentPropertyCondition = Object.freeze({ + WITH_FURNITURE: 0, + WITHOUT_FURNITURE: 1, +}); + +const RentPropertyConditionLabels = Object.freeze({ + [RentPropertyCondition.WITH_FURNITURE]: 'مفروش', + [RentPropertyCondition.WITHOUT_FURNITURE]: 'غير مفروش', +}); + +export { RentPropertyCondition, RentPropertyConditionLabels }; diff --git a/app/enums/RentPropertyType.js b/app/enums/RentPropertyType.js new file mode 100644 index 0000000..29dc09a --- /dev/null +++ b/app/enums/RentPropertyType.js @@ -0,0 +1,17 @@ +/** + * RentPropertyType Enum + * Sent as `type` field in RentPropertyDto + */ +const RentPropertyType = Object.freeze({ + FURNISHED: 0, + UNFURNISHED: 1, + SEMI_FURNISHED: 2, +}); + +const RentPropertyTypeLabels = Object.freeze({ + [RentPropertyType.FURNISHED]: 'مفروش بالكامل', + [RentPropertyType.UNFURNISHED]: 'غير مفروش', + [RentPropertyType.SEMI_FURNISHED]: 'مفروش جزئياً', +}); + +export { RentPropertyType, RentPropertyTypeLabels }; diff --git a/app/enums/RentType.js b/app/enums/RentType.js new file mode 100644 index 0000000..74a6328 --- /dev/null +++ b/app/enums/RentType.js @@ -0,0 +1,16 @@ +/** + * RentType Enum + * Rental period type + * Sent as `rentType` field in API + */ +const RentType = Object.freeze({ + MONTHLY: 0, + DAILY: 1, +}); + +const RentTypeLabels = Object.freeze({ + [RentType.MONTHLY]: 'شهري', + [RentType.DAILY]: 'يومي', +}); + +export { RentType, RentTypeLabels }; diff --git a/app/enums/index.js b/app/enums/index.js index 20883a5..db5bc79 100644 --- a/app/enums/index.js +++ b/app/enums/index.js @@ -13,3 +13,9 @@ export { City, CitiesList, extractCity } from './City'; export { LoginMethod } from './LoginMethod'; export { OwnerType, OwnerTypeLabels } from './OwnerType'; export { CustomerType, CustomerTypeLabels } from './CustomerType'; +export { RentPropertyCondition, RentPropertyConditionLabels } from './RentPropertyCondition'; +export { RentPropertyType, RentPropertyTypeLabels } from './RentPropertyType'; +export { RentType, RentTypeLabels } from './RentType'; +export { PropertyService, PropertyServiceLabels, PropertyServicesList } from './PropertyService'; +export { PropertyTerm, PropertyTermLabels, PropertyTermsList } from './PropertyTerm'; +export { Currency, CurrencyLabels, CurrencySymbols } from './Currency';