Skip to content

Commit

Permalink
refactor: (#763) 직렬화 코드 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
4mjeo committed Sep 22, 2024
1 parent c3a2086 commit dfbbf1b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package team.aliens.dms.domain.student.dto

import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import team.aliens.dms.domain.manager.spi.vo.StudentWithTag
import team.aliens.dms.domain.student.model.Sex
import team.aliens.dms.domain.student.model.Student
Expand Down Expand Up @@ -49,17 +46,17 @@ data class StudentNameResponse(
val name: String
)

data class StudentDetailsResponse @JsonCreator constructor(
@JsonProperty("id") val id: UUID,
@JsonProperty("name") val name: String,
@JsonProperty("gcn") val gcn: String,
@JsonProperty("profileImageUrl") val profileImageUrl: String,
@JsonProperty("sex") val sex: Sex? = null,
@JsonProperty("bonusPoint") val bonusPoint: Int? = null,
@JsonProperty("minusPoint") val minusPoint: Int? = null,
@JsonProperty("roomNumber") val roomNumber: String? = null,
@JsonProperty("roomMates") val roomMates: List<RoomMate>? = null,
@JsonProperty("tags") val tags: List<TagResponse>? = null
data class StudentDetailsResponse(
val id: UUID,
val name: String,
val gcn: String,
val profileImageUrl: String,
val sex: Sex? = null,
val bonusPoint: Int? = null,
val minusPoint: Int? = null,
val roomNumber: String? = null,
val roomMates: List<RoomMate>? = null,
val tags: List<TagResponse>? = null
) {
data class RoomMate(
val id: UUID,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package team.aliens.dms.domain.tag.dto

import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
import team.aliens.dms.domain.tag.model.Tag
import java.util.UUID


data class TagResponse @JsonCreator constructor(
@JsonProperty("id") val id: UUID,
@JsonProperty("name") val name: String?,
@JsonProperty("color") val color: String?
data class TagResponse(
val id: UUID,
val name: String?,
val color: String?
) {
companion object {
fun of(tag: Tag): TagResponse {
Expand Down

0 comments on commit dfbbf1b

Please sign in to comment.