Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

강의동 Mock Data 추가 #212

Merged
merged 5 commits into from
Jan 22, 2024
Merged

강의동 Mock Data 추가 #212

merged 5 commits into from
Jan 22, 2024

Conversation

subeenpark-io
Copy link
Member

  • v1/search_query API에서 강의동에 대한 더미 데이터를 받을 수 있도록합니다.
  • Q.ClassPlaceAndTimeLegacyDto만 쓰이고 ClassPlaceAndTimeDto는 안쓰이는 것 같은데 이유를 아시는분?? @Hank-Choi @davin111
POST /v1/search_query

[
  {
    "_id": "61e4c9417d86910064ed1289",
    "academic_year": "1학년",
    "category": "",
    "class_time_json": [
      {
        "day": 0,
        "place": "4-309",
        "startMinute": 750,
        "endMinute": 825,
        "start_time": "12:30",
        "end_time": "13:45",
        "len": 1.5,
        "start": 4.5,
        "lectureHall": {
          "id": "049f607c-8b9d-4f4c-8d16-5bc193030159",
          "buildingNumber": "500",
          "buildingNameKor": "자연과학대학(500)",
          "buildingNameEng": "College of Natural Sciences(500)",
          "locationInDMS": {
            "lat": 37.4592190840394,
            "lon": 126.94812006718699
          },
          "locationInDecimal": {
            "lat": 488525.0,
            "lon": 1099948.0
          },
          "campus": "GWANAK"
        }
      },
      {
        "day": 2,
        "place": "4-309",
        "startMinute": 750,
        "endMinute": 825,
        "start_time": "12:30",
        "end_time": "13:45",
        "len": 1.5,
        "start": 4.5,
        "lectureHall": {
          "id": "f50eb8b5-ba33-4b92-bdd0-8d4e0b4d386a",
          "buildingNumber": "500",
          "buildingNameKor": "자연과학대학(500)",
          "buildingNameEng": "College of Natural Sciences(500)",
          "locationInDMS": {
            "lat": 37.4592190840394,
            "lon": 126.94812006718699
          },
          "locationInDecimal": {
            "lat": 488525.0,
            "lon": 1099948.0
          },
          "campus": "GWANAK"
        }
      }
    ],
    "classification": "전선",
    "credit": 3,
    "department": "중어중문학과",
    "instructor": "이현정",
    "lecture_number": "001",
    "quota": 50,
    "remark": "전공탐색",
    "semester": 1,
    "year": 2022,
    "course_number": "100.106",
    "course_title": "중국의 대중문학",
    "registrationCount": 0,
    "wasFull": false,
    "class_time_mask": [
      1835008,
      0,
      1835008,
      0,
      0,
      0,
      0
    ]
  },
...

@subeenpark-io subeenpark-io requested review from PFCJeong and a team as code owners January 10, 2024 00:36
@subeenpark-io subeenpark-io requested review from davin111, Hank-Choi and Jhvictor4 and removed request for a team January 10, 2024 00:36
Copy link
Member

@davin111 davin111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LectureHall 데이터는 언제 어떻게 채워지나요


enum class Campus {
GWANAK,
YEONGUN,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeongeon 이 일관될 듯

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔫

package com.wafflestudio.snu4t.lecturehalls.data

class GeoCoordinate(
val lat: Double,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

약어 딴곳에서도 잘 안 쓰니까 안 쓰는 게 좋지 않을까

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lat/lon 말한거지? 바꿨음

@@ -34,6 +38,7 @@ data class ClassPlaceAndTimeLegacyDto(
val periodLength: Double,
@JsonProperty("start")
val startPeriod: Double,
val lectureHall: LectureHall?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

한 dto 안에 snake 랑 섞여있지만 새로 만드는 건 camel 로 하는 게 나으려나…

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

엉 섞여있는데 앞으로의 방향성은 camel이라고 해서 우선 일케해쓰

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅇㅇ 이미 얘기 끝났던건데


@Document
data class LectureHall(
@Id
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

지금도 lecture 에 강의실 정보 있긴 한데, 따로 document 파는 게 좋은 이유는 머 때문이야?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 우선 Lecture에 종속되는 정보가 아니기도 하고(한 강의동 - 여러 강의)
  • 이 데이터들만 가지고 기능이 새로 나올 수 있다고 생각했기 때문! 건물간 시간 보여준다거나/걔를 이용해서 가까운 강의실 강의 검색하거나 등등 본격적인 지도 기능이 들어가려면 얘가 별도 document로 있는게 낫다고 생각했음

import org.springframework.data.mongodb.core.mapping.Document

@Document
data class LectureHall(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

원어민이 아니라 궁금한 건데 쥐콩만한 강의실도 hall?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요것은 강의실(X) 강의동(O) 입니다. 건물 전체를 말하는거라 Building을 할까 Hall을 할까 하다가 Hall로 했는데 더 나은 것 있으면 추천받아요

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

빌딩이 더 낫지않나?

@subeenpark-io
Copy link
Member Author

LectureHall 데이터는 언제 어떻게 채워지나요

기존 lecture에 place 정보 싹 긁어서 모아다가 걍 배치 이용해서 한번에 populate 하려고 했음 데이터 출처는 여기
건물 자주 안바뀌기도 하고.. 수동으로 학기에 한번정도면 충분하지 않을까 하는 맴

@@ -34,6 +38,7 @@ data class ClassPlaceAndTimeLegacyDto(
val periodLength: Double,
@JsonProperty("start")
val startPeriod: Double,
val lectureHall: LectureHall?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅇㅇ 이미 얘기 끝났던건데

)

private fun MockLectureHall() = LectureHall(
id = UUID.randomUUID().toString(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

왜 UUID?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uuid 스펙이랑 다름 ObjectId.get().toHexString() ㄱㄱ

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그냥 mock이라서? 아무 스트링이나 넣었음

@Hank-Choi
Copy link
Contributor

Hank-Choi commented Jan 22, 2024

ClassPlaceAndTimeDto는 쓰이고 있긴해
그리고 안드랑 ios가 startMinute, endMinute기반으로 바꾸고 1년 뒤 ClassPlaceAndTimeLegacyDto -> ClassPlaceAndTimeDto
전환 예정

정확히는
TimetableLegacyDto-TimetableLectureLegacyDto-ClassPlaceAndTimeLegacyDto 한세트고
TimetableDto-TimetableLectureDto-ClassPlaceAndTimeDto 한 세트 해서
친구기능에만 TimetableDto 내려가고 있음

이전에 쓰던 시간표응답에는 TimetableLegacyDto 이거 내려가고 있는데 약 1년반 뒤는 TimetableDto로 바꾸고 레거시 붙은거 다 삭제할듯

@subeenpark-io subeenpark-io merged commit 7998aa6 into develop Jan 22, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants