Programming Language , Framework, Library
- ExpressJS (server)
- GraphQL (query api)
- MongooseDB (database)
- Heroku (deploy)
user
+---id (id)
+---username (id)
+---password (string)
+---favourite (list)
+---planner (list)
+---share (list)
planner
+---id (id)
+---userID (id)
+---author (json)
| +--user*
+---name (string)
+---days (list)
| +--day (int)
| +--date (date)
| +--places (list)
| | +--place*
| | +--time (json)
| | +--start (time)
| | +--end (time)
| +--note (string)
+---share (bool)
place
+---placeID (string)
+---name (string)
+---category (list)
+---description (string)
+---img (list)
+---rate (int)
+---days (json)
| +--day1 (bool)
| +--day2 (bool)
| +--day3 (bool)
| +--day4 (bool)
| +--day5 (bool)
| +--day6 (bool)
| +--day7 (bool)
+---time (string) (open-close)
+---howToTravel (string)
+---contact (json)
| +--phones (list)
| +--mobiles (list)
| +--emails (list)
| +--urls (list)
+---service (json)
| +--payment (list)
| +--facilities (json)
| +-code
| +-description
+---location (json)
| +--address
| +--district
| +--sub_districe
| +--province
| +--postcode
+---map (json)
| +--latitude (float)
| +--lontitude (float)
- Date year-month-day
- Time 14:00:00+07:00
{
planner(id:$id){
...
}
}
{
sharePlanner{
planner*
}
}
- Get user planners (for admin)
{
userPlanner(id:$id|name:$string){
planner*
}
}
{
places(category:$string|keyword:$string|provincename:$string|(geolocation:$string & searchradius:$int)|destination:$string){
placeID,
name,
time,
category,
location{
district,
province
},
map{
latitude,
longitude,
},
categoryCode,
thumbnail,
rate,
}
}
{
placeDetail(null|(placeID:$string & categoryCode:$string)){
place*
}
}
mutation{
register(username:$string,password:$string){
user*
}
}
mutation{
updateUser(id:$id, | password:$password | favourite:[$id] | planner: [$id] ){
user*
}
}
mutation{
createPlanner(userID:$id,name:$string,share:true ($bool),days:[$days]){
planner*
}
}
mutation{
updatePlanner(id:$id, | name:$string | days:[$days] | share:$bool){
planner*
}
}
mutation{
removePlanner(id:$id){
planner*
}
}