-
Notifications
You must be signed in to change notification settings - Fork 0
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
강의동 Mock Data 추가 #212
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wafflestudio.snu4t.lecturehalls.data | ||
|
||
enum class Campus { | ||
GWANAK, | ||
YEONGUN, | ||
PYEONGCHANG, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.wafflestudio.snu4t.lecturehalls.data | ||
|
||
class GeoCoordinate( | ||
val lat: Double, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 약어 딴곳에서도 잘 안 쓰니까 안 쓰는 게 좋지 않을까 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lat/lon 말한거지? 바꿨음 |
||
val lon: Double | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.wafflestudio.snu4t.lecturehalls.data | ||
|
||
import org.springframework.data.annotation.Id | ||
import org.springframework.data.mongodb.core.mapping.Document | ||
|
||
@Document | ||
data class LectureHall( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 원어민이 아니라 궁금한 건데 쥐콩만한 강의실도 hall? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 요것은 강의실(X) 강의동(O) 입니다. 건물 전체를 말하는거라 Building을 할까 Hall을 할까 하다가 Hall로 했는데 더 나은 것 있으면 추천받아요 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 빌딩이 더 낫지않나? |
||
@Id | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 지금도 lecture 에 강의실 정보 있긴 한데, 따로 document 파는 게 좋은 이유는 머 때문이야? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
val id: String? = null, | ||
|
||
// 동 | ||
val buildingNumber: String, | ||
|
||
// 건물 이름(한국어) - 자연과학대학(500) | ||
val buildingNameKor: String? = null, | ||
|
||
// 건물 이름(영어) - College of Natural Sciences(500) | ||
val buildingNameEng: String? = null, | ||
|
||
// 위경도 - 37.4592190840394, 126.948120067187 | ||
val locationInDMS: GeoCoordinate, | ||
|
||
// 위경도(십진표기) - 488525, 1099948 | ||
val locationInDecimal: GeoCoordinate, | ||
|
||
// 캠퍼스 - 관악 | ||
val campus: Campus, | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package com.wafflestudio.snu4t.lectures.data | ||
|
||
import com.wafflestudio.snu4t.common.enum.DayOfWeek | ||
import com.wafflestudio.snu4t.lecturehalls.data.LectureHall | ||
|
||
data class ClassPlaceAndTime( | ||
val day: DayOfWeek, | ||
val place: String, | ||
val startMinute: Int, | ||
val endMinute: Int, | ||
var lectureHall: LectureHall? | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,14 @@ package com.wafflestudio.snu4t.lectures.dto | |
|
||
import com.fasterxml.jackson.annotation.JsonProperty | ||
import com.wafflestudio.snu4t.common.enum.DayOfWeek | ||
import com.wafflestudio.snu4t.lecturehalls.data.Campus | ||
import com.wafflestudio.snu4t.lecturehalls.data.GeoCoordinate | ||
import com.wafflestudio.snu4t.lecturehalls.data.LectureHall | ||
import com.wafflestudio.snu4t.lectures.data.ClassPlaceAndTime | ||
import com.wafflestudio.snu4t.lectures.utils.endPeriod | ||
import com.wafflestudio.snu4t.lectures.utils.minuteToString | ||
import com.wafflestudio.snu4t.lectures.utils.startPeriod | ||
import java.util.UUID | ||
|
||
data class ClassPlaceAndTimeDto( | ||
val day: DayOfWeek, | ||
|
@@ -34,6 +38,7 @@ data class ClassPlaceAndTimeLegacyDto( | |
val periodLength: Double, | ||
@JsonProperty("start") | ||
val startPeriod: Double, | ||
val lectureHall: LectureHall? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 한 dto 안에 snake 랑 섞여있지만 새로 만드는 건 camel 로 하는 게 나으려나… There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 엉 섞여있는데 앞으로의 방향성은 camel이라고 해서 우선 일케해쓰 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ㅇㅇ 이미 얘기 끝났던건데 |
||
) | ||
|
||
fun ClassPlaceAndTimeLegacyDto(classPlaceAndTime: ClassPlaceAndTime): ClassPlaceAndTimeLegacyDto = ClassPlaceAndTimeLegacyDto( | ||
|
@@ -45,4 +50,15 @@ fun ClassPlaceAndTimeLegacyDto(classPlaceAndTime: ClassPlaceAndTime): ClassPlace | |
endTime = minuteToString(classPlaceAndTime.endMinute), | ||
startPeriod = classPlaceAndTime.startPeriod, | ||
periodLength = classPlaceAndTime.endPeriod - classPlaceAndTime.startPeriod, | ||
lectureHall = MockLectureHall() | ||
) | ||
|
||
private fun MockLectureHall() = LectureHall( | ||
id = UUID.randomUUID().toString(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 왜 UUID? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uuid 스펙이랑 다름 ObjectId.get().toHexString() ㄱㄱ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 그냥 mock이라서? 아무 스트링이나 넣었음 |
||
buildingNumber = "500", | ||
buildingNameKor = "자연과학대학(500)", | ||
buildingNameEng = "College of Natural Sciences(500)", | ||
locationInDMS = GeoCoordinate(37.4592190840394, 126.94812006718699), | ||
locationInDecimal = GeoCoordinate(488525.0, 1099948.0), | ||
campus = Campus.GWANAK | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeongeon 이 일관될 듯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔫