This repository has been archived by the owner on May 19, 2024. It is now read-only.
-
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.
- Loading branch information
1 parent
f0a3fbd
commit 8322aed
Showing
5 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
domain/src/main/kotlin/com/studentcenter/weave/domain/chat/entity/ChatMember.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.studentcenter.weave.domain.chat.entity | ||
|
||
import com.studentcenter.weave.domain.common.DomainEntity | ||
import com.studentcenter.weave.support.common.uuid.UuidCreator | ||
import java.time.LocalDateTime | ||
import java.util.* | ||
|
||
data class ChatMember( | ||
override val id: UUID = UuidCreator.create(), | ||
val chatRoomId: UUID, | ||
val userId: UUID, | ||
val lastReadMessageId: UUID? = null, | ||
val lastReadAt: LocalDateTime? = null, | ||
) : DomainEntity { | ||
|
||
companion object { | ||
|
||
fun create( | ||
chatRoomId: UUID, | ||
userId: UUID, | ||
): ChatMember { | ||
return ChatMember( | ||
chatRoomId = chatRoomId, | ||
userId = userId | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
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
22 changes: 22 additions & 0 deletions
22
...estFixtures/kotlin/com/studentcenter/weave/domain/chat/entity/ChatMemberFixtureFactory.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.studentcenter.weave.domain.chat.entity | ||
|
||
import com.studentcenter.weave.support.common.uuid.UuidCreator | ||
import java.time.LocalDateTime | ||
import java.util.* | ||
|
||
object ChatMemberFixtureFactory { | ||
|
||
fun create( | ||
chatRoomId: UUID = UuidCreator.create(), | ||
userId: UUID = UuidCreator.create(), | ||
lastReadMessageId: UUID? = null, | ||
lastReadAt: LocalDateTime? = null, | ||
): ChatMember { | ||
return ChatMember( | ||
chatRoomId = chatRoomId, | ||
userId = userId, | ||
lastReadMessageId = lastReadMessageId, | ||
lastReadAt = lastReadAt | ||
) | ||
} | ||
} |
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