forked from wine-area/DMS-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dto
- Loading branch information
Showing
4 changed files
with
54 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 18 additions & 7 deletions
25
.../main/kotlin/team/aliens/dms/persistence/student/repository/vo/QueryStudentWithPointVO.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
package team.aliens.dms.persistence.student.repository.vo | ||
|
||
import com.querydsl.core.annotations.QueryProjection | ||
import team.aliens.dms.common.annotation.EncryptType | ||
import team.aliens.dms.common.annotation.EncryptedColumn | ||
import team.aliens.dms.domain.point.spi.vo.StudentWithPointVO | ||
|
||
data class QueryStudentWithPointVO @QueryProjection constructor( | ||
val name: String, | ||
val grade: Int, | ||
val classRoom: Int, | ||
val number: Int, | ||
val bonusTotal: Int?, | ||
val minusTotal: Int? | ||
class QueryStudentWithPointVO @QueryProjection constructor( | ||
@EncryptedColumn(type = EncryptType.SYMMETRIC) | ||
override val name: String, | ||
grade: Int, | ||
classRoom: Int, | ||
number: Int, | ||
bonusTotal: Int?, | ||
minusTotal: Int?, | ||
) : StudentWithPointVO( | ||
name = name, | ||
grade = grade, | ||
classRoom = classRoom, | ||
number = number, | ||
bonusTotal = bonusTotal ?: 0, | ||
minusTotal = minusTotal ?: 0 | ||
) |
42 changes: 32 additions & 10 deletions
42
...c/main/kotlin/team/aliens/dms/persistence/student/repository/vo/QueryStudentsWithTagVO.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,40 @@ | ||
package team.aliens.dms.persistence.student.repository.vo | ||
|
||
import com.querydsl.core.annotations.QueryProjection | ||
import team.aliens.dms.common.annotation.EncryptType | ||
import team.aliens.dms.common.annotation.EncryptedColumn | ||
import team.aliens.dms.domain.manager.spi.vo.StudentWithTag | ||
import team.aliens.dms.domain.student.model.Sex | ||
import team.aliens.dms.domain.tag.model.Tag | ||
import team.aliens.dms.persistence.tag.entity.TagJpaEntity | ||
import java.util.UUID | ||
|
||
data class QueryStudentsWithTagVO @QueryProjection constructor( | ||
val id: UUID, | ||
val name: String, | ||
val grade: Int, | ||
val classRoom: Int, | ||
val number: Int, | ||
val roomNumber: String, | ||
val profileImageUrl: String, | ||
val sex: Sex, | ||
val tags: List<TagJpaEntity> | ||
class QueryStudentsWithTagVO @QueryProjection constructor( | ||
id: UUID, | ||
@EncryptedColumn(type = EncryptType.SYMMETRIC) | ||
override val name: String, | ||
grade: Int, | ||
classRoom: Int, | ||
number: Int, | ||
roomNumber: String, | ||
profileImageUrl: String, | ||
sex: Sex, | ||
tags: List<TagJpaEntity> | ||
) : StudentWithTag( | ||
id = id, | ||
name = name, | ||
grade = grade, | ||
classRoom = classRoom, | ||
number = number, | ||
roomNumber = roomNumber, | ||
profileImageUrl = profileImageUrl, | ||
sex = sex, | ||
tags = tags.map { | ||
Tag( | ||
id = it.id!!, | ||
name = it.name, | ||
color = it.color, | ||
schoolId = it.school!!.id!! | ||
) | ||
} | ||
) |