Last active
January 3, 2020 07:04
-
-
Save tsega/650f421895034b38581ec18199e62b04 to your computer and use it in GitHub Desktop.
The restaculous settings.json file for Ahad Platform Hotel Booking API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Ahad Hotel Booking API", | |
"description": "Ahad Platform Hotel Booking API.", | |
"author": "Tsegaselassie Tadesse <[email protected]>", | |
"directory": "../ahad-hotel-booking-api", | |
"repository": { | |
"type": "git", | |
"url": "https://github.com/tsega/ahad-hotel-booking-api.git" | |
}, | |
"authentication": true, | |
"config": [ | |
{ | |
"name": "HTTP_PORT", | |
"value": 8000 | |
}, | |
{ | |
"name": "MONGODB_URL", | |
"value": "mongodb://localhost/ahad-hotel-booking" | |
}, | |
{ | |
"name": "SALT_LENGTH", | |
"value": 13 | |
}, | |
{ | |
"name": "JWT_KEY", | |
"value": "M7k3&T5gA@M00s$3" | |
}, | |
{ | |
"name": "MAX_PAGE_SIZE", | |
"value": 100 | |
}, | |
{ | |
"name": "DEFAULT_SORT", | |
"value": "updatedAt" | |
} | |
], | |
"models": [ | |
{ | |
"name": "Hotel", | |
"authentication": [ | |
"post", | |
"put", | |
"delete" | |
], | |
"attributes": [ | |
{ | |
"name": "name", | |
"type": "String", | |
"desc": "The name of the hotel.", | |
"example": "Sheraton Addis" | |
}, | |
{ | |
"name": "star", | |
"type": "Number", | |
"desc": "The star level of the hotel.", | |
"example": 5 | |
}, | |
{ | |
"name": "address", | |
"type": "String", | |
"desc": "The address of the hotel.", | |
"example": "Taitu St, Addis Ababa 1000" | |
}, | |
{ | |
"name": "phone", | |
"type": "String", | |
"desc": "The phone number of the hotel.", | |
"example": "+251115171717" | |
}, | |
{ | |
"name": "description", | |
"type": "String", | |
"desc": "A general description of the hotel.", | |
"example": "Set in a grand, Colonial-style building, this upscale hotel is 1 km from the Ethiopian National Theatre and 2 km from the National Museum of Ethiopia. \n Relaxed, simply furnished rooms come with flat-screen TVs, minibars and desks. Club-floor rooms add lounge access and free cocktails, while suites feature separate living rooms; some have balconies or dining rooms. There are 3-storey villas with butler service and private pools, plus saunas and gyms." | |
}, | |
{ | |
"name": "images", | |
"type": "[Object]", | |
"desc": "The images of the hotel.", | |
"example": [ | |
{ | |
"_id": "5da0a7b3dd30a21cd0692c61", | |
"file": "/hotels/sheraton/image2.jpg", | |
"title": "Courtyard" | |
}, | |
{ | |
"_id": "5da0a7d471fdfc1ddfee54cb", | |
"file": "/hotels/sheraton/image2.jpg", | |
"title": "Lalibella Hall" | |
} | |
] | |
} | |
], | |
"relations": [ | |
{ | |
"name": "Amenity", | |
"referenceType": "multiple" | |
}, | |
{ | |
"name": "Media", | |
"referenceType": "multiple" | |
}, | |
{ | |
"name": "Room", | |
"referenceType": "multiple" | |
} | |
] | |
}, | |
{ | |
"name": "Room", | |
"authentication": [ | |
"post", | |
"put", | |
"delete" | |
], | |
"attributes": [ | |
{ | |
"name": "name", | |
"type": "String", | |
"desc": "The name of the room.", | |
"example": "Classic King Guest" | |
}, | |
{ | |
"name": "number", | |
"type": "String", | |
"desc": "The room number.", | |
"example": "401" | |
}, | |
{ | |
"name": "floor", | |
"type": "String", | |
"desc": "The floor on which the room is located.", | |
"example": "4" | |
}, | |
{ | |
"name": "description", | |
"type": "String", | |
"desc": "A general description of the room.", | |
"example": "Our inviting 31-square-meter Classic Rooms provide a refined, contemporary space for your professional or leisurely stay in Addis Ababa. Socialize or work in the sitting area for two that comes equipped with a writing desk for your correspondence. Step on the balcony to breathe in the delicate fragrance of Ethiopian roses while enjoying the views of the city's majestic hills or the hotel’s turquoise pool and manicured gardens. Unwind with a Bose radio and music system and a 42\" flat screen television. Four telephone lines and a fax line with DID (direct inward dialing), along with High Speed Internet Access available at a charge allow you to stay connected around the clock. For your comfort, a mini-bar and separate AC unit are also available in each room.The bathroom is beautifully appointed with marble vanities and a combined shower and bathtub, a bidet, and a vanity table. Our signature Luxury Collection amenity line of custom-blended soaps, shampoos, and moisturizers is an invitation to indulgence. Additional thoughtful details include a salon-style hair dryer, plush slippers and terry cloth robe. At nighttime, sink into a king-size bed from our Luxury Collection featuring superior 250-thread cotton linen, down comforter and plump pillows." | |
}, | |
{ | |
"name": "rates", | |
"type": "[Object]", | |
"desc": "The different rates of the room.", | |
"example": [ | |
{ | |
"_id": "5da0a7b3dd30a21cd0692c61", | |
"rateType": "Holiday Season", | |
"amount": 1500.00 | |
}, | |
{ | |
"_id": "5da0a7d471fdfc1ddfee54cb", | |
"rateType": "Low Season", | |
"amount": 1200.00 | |
}, | |
{ | |
"_id": "5da0a7d471fdfc1ddfee54cb", | |
"rateType": "Normal", | |
"amount": 1350.00 | |
} | |
] | |
} | |
], | |
"relations": [ | |
{ | |
"name": "Amenity", | |
"referenceType": "multiple" | |
}, | |
{ | |
"name": "Media", | |
"referenceType": "multiple" | |
}, | |
{ | |
"name": "Hotel", | |
"referenceType": "single" | |
} | |
] | |
}, | |
{ | |
"name": "Booking", | |
"attributes": [ | |
{ | |
"name": "referenceNumber", | |
"type": "String", | |
"desc": "The reference number for the booking.", | |
"example": "SHT-091019123" | |
}, | |
{ | |
"name": "startDate", | |
"type": "Date", | |
"desc": "The start date of the booking.", | |
"example": "2019-12-13T17:19:08.404Z" | |
}, | |
{ | |
"name": "endDate", | |
"type": "Date", | |
"desc": "The end date of the booking.", | |
"example": "2019-12-18T17:19:08.404Z" | |
}, | |
{ | |
"name": "numberOfAdults", | |
"type": "Number", | |
"desc": "The number of Adults.", | |
"example": 2 | |
}, | |
{ | |
"name": "numberOfChildren", | |
"type": "Number", | |
"desc": "The number of children.", | |
"example": 2 | |
}, | |
{ | |
"name": "appliedRates", | |
"type": "[Object]", | |
"desc": "The room rates applied for the booking.", | |
"example": [ | |
{ | |
"roomId": "5da0a7b3dd30a21cd0692c61", | |
"rateType": "Holiday Season", | |
"amount": 1500.00 | |
} | |
] | |
}, | |
{ | |
"name": "discounts", | |
"type": "[Object]", | |
"desc": "The discounts applied to the booking.", | |
"example": [ | |
{ | |
"_id": "5da0a7b3dd30a21cd0692c61", | |
"discountType": "First-time customer", | |
"amount": 100.50 | |
}, | |
{ | |
"_id": "5da0a7d471fdfc1ddfee54cb", | |
"discountType": "Coupon", | |
"amount": 145.50 | |
} | |
] | |
}, | |
{ | |
"name": "total", | |
"type": "Number", | |
"desc": "The total amount to be paid after discounts.", | |
"example": 7154.00 | |
}, | |
{ | |
"name": "status", | |
"type": "String", | |
"desc": "The status of the booking.", | |
"example": "Confirmed" | |
}, | |
{ | |
"name": "reasonForCancellation", | |
"type": "String", | |
"desc": "The reason for cancellation of booking, if canceled.", | |
"example": "No Show" | |
} | |
], | |
"relations": [ | |
{ | |
"name": "Room", | |
"referenceType": "Multiple" | |
}, | |
{ | |
"name": "Customer", | |
"referenceType": "single" | |
} | |
] | |
}, | |
{ | |
"name": "Review", | |
"attributes": [ | |
{ | |
"name": "title", | |
"type": "String", | |
"desc": "The title of the review.", | |
"example": "Awesome view of Addis!" | |
}, | |
{ | |
"name": "description", | |
"type": "String", | |
"desc": "The description of the review.", | |
"example": "I love the hotel building, the fountain, the staff. Spacious comfortable rooms." | |
}, | |
{ | |
"name": "star", | |
"type": "Number", | |
"desc": "The star rating given in the review.", | |
"example": 5 | |
} | |
], | |
"relations": [ | |
{ | |
"name": "Hotel", | |
"referenceType": "single" | |
}, | |
{ | |
"name": "Customer", | |
"referenceType": "single" | |
} | |
] | |
}, | |
{ | |
"name": "Customer", | |
"attributes": [ | |
{ | |
"name": "email", | |
"type": "String", | |
"desc": "The email of the customer.", | |
"example": "[email protected]" | |
}, | |
{ | |
"name": "fullName", | |
"type": "String", | |
"desc": "The full name of the user.", | |
"example": "John Doe" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment