Skip to content

Commit

Permalink
Merge pull request #58 from Workout-Study/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
12OneTwo12 authored Aug 18, 2024
2 parents 7272073 + c52f62b commit 7391a85
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data class UserCreateMessageDto(
val userId: Int,
val nickname: String,
val state: Boolean,
val imageUrl: String,
val createdAt: String,
val updatedAt: String
)
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class UserForReadMapper {
userCreateMessageDto.userId,
userCreateMessageDto.nickname,
userCreateMessageDto.state,
userCreateMessageDto.imageUrl,
eventPublisher
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import java.time.Instant
class UserForReadEntity(
@Column(nullable = false) val userId: Int,
@Column(nullable = false) var nickname: String,
@Column(nullable = true) var imageUrl: String,
createUser: String
) : BaseEntity(GlobalStatus.PERSISTENCE_NOT_DELETED, Instant.now(), createUser) {

Expand All @@ -22,6 +23,7 @@ class UserForReadEntity(
val userForReadEntity = UserForReadEntity(
domain.userId,
domain.nickname,
domain.imageUrl,
domain.createUser
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ data class CreateUserForReadCommand(
val userId: Int,
val nickname: String,
val state: Boolean,
val imageUrl: String,
@field:NotEmpty val eventPublisher: String
) : SelfValidating<CreateUserForReadCommand>() {
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ data class UserInfoResponseDto(
val userId: Int,
val nickname: String,
val state: Boolean,
val imageUrl: String,
val createdAt: Instant,
val updatedAt: Instant
)
5 changes: 5 additions & 0 deletions src/main/kotlin/com/fitmate/myfit/domain/UserForRead.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class UserForRead(
val id: Long?,
val userId: Int,
var nickname: String,
var imageUrl: String,
createUser: String
) : BaseDomain(GlobalStatus.PERSISTENCE_NOT_DELETED, createdAt = Instant.now(), createUser = userId.toString()) {
fun updateByUserInfo(userInfo: UserInfoResponseDto, saveUserForReadCommand: SaveUserForReadCommand) {
Expand All @@ -23,6 +24,7 @@ class UserForRead(
fun updateByUserCommand(createUserForReadCommand: CreateUserForReadCommand) {
this.nickname = createUserForReadCommand.nickname
this.state = createUserForReadCommand.state
this.imageUrl = createUserForReadCommand.imageUrl
this.updatedAt = Instant.now()
this.updateUser = createUserForReadCommand.eventPublisher
}
Expand All @@ -34,6 +36,7 @@ class UserForRead(
entity.id,
entity.userId,
entity.nickname,
entity.imageUrl,
entity.createUser
)

Expand All @@ -50,6 +53,7 @@ class UserForRead(
null,
userInfo.userId,
userInfo.nickname,
userInfo.imageUrl,
saveUserForReadCommand.eventPublisher
)

Expand All @@ -63,6 +67,7 @@ class UserForRead(
null,
command.userId,
command.nickname,
command.imageUrl,
command.eventPublisher
)

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/slack-properties.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
token: null

0 comments on commit 7391a85

Please sign in to comment.