// /barbers
{
"barbers": [
{
"_id", // '23u98hfdsuhvudihbiuhu3i25'
"title", // '이양현 바버샵'
"description", // '매주 월요일은 휴무입니다.'
"location", // '평택시' (short_address)
"rating", // 4.3 (리뷰 평점 평균내서 소수점 2자리에서 반올림)
"bookmarked", // false (지금은 아직 미사용)
"phone", // '010-2322-2222'
"thumb" // 'https://api.barberforce.shop/img/고유식별자' (이미지 업로드 시 지금은 그냥 이미지 하나 두고 그 링크 주면 될듯 더미로)
},
// ...
]
}
// /barbers/:id
{
"_id", // '23u98hfdsuhvudihbiuhu3i25'
"title", // '이양현 바버샵'
"description", // '매주 월요일은 휴무입니다.'
"location", // '평택시' (short_address)
"location_detail", //'경기도 평택시 어쩌구저쩌구 12-21'
"rating", // 4.3 (리뷰 평점 평균내서 소수점 2자리에서 반올림)
"bookmarked", // false (지금은 아직 미사용)
"phone", // '010-2322-2222'
"thumb" // 'https://api.barberforce.shop/img/고유식별자' (이미지 업로드 시 지금은 그냥 이미지 하나 두고 그 링크 주면 될듯 더미로)
}
// /barbers/:id/reviews
{
"reviews": [
{
"_id", // 'bsgnb85235njznjkdsamdsdakfnasd'
"reviewer", // '안주현' (얘는 평소에 objectId(user)로 가지고있다가 프론트로 뿌릴때만 이름으로 변환(populate쓰면됨) 해야될듯. < 리뷰를 누가쓴건지 검증해야되서)
"thumb", // null (얘는 이미지를 뿌려주거나 null 주면 됨 (지금 null 이면 기본이미지 뜨게 해둠))
"body", // '잆 밊용싨 갮못짫랎엾',
"rating", // 4.5
"createdAt", // ''
}
]
}
// /barbers/:id/reservations/:year/:month
{
"reservations": [
{
"day", // 날짜 (그 달의 월)
"times": {
"00:00" // false or true (이 시각 예약여부)
~ "23:59"
}
},
]
}
// /reservations
{
"reservations": [
{
"_id", // '123ndfklbnsdfjnbgfsnkgfknbl'
"time", // '2021-10-25T10:30:00.000Z'
"barber": { // 평소엔 objectId로 가지고있다가 populate로 처리하거나 그냥 쌩으로 쿼리날려서 붙여서 보내주면 될 듯
// /barbers/:id 의 결과와 동일하게
},
"done" // true or false (이거 그 메인페이지에서 '이발이 완료되셨나요?' 예 누르면 이게 true로 바뀌게 해줭 (api하나 더 만들어야 할듯 [POST] /reservation/:id/done 같은걸로?))
}
]
}