Skip to content

Commit

Permalink
[PBE-5450] member entity
Browse files Browse the repository at this point in the history
  • Loading branch information
kanat authored and JcMinarro committed Aug 7, 2024
1 parent 2bdb074 commit 4935df2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,7 @@ internal data class MemberEntity(

/** The user's status. */
val status: String? = null,

/** The date the ban expires. */
var banExpires: Date? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ internal fun Member.toEntity(): MemberEntity = MemberEntity(
channelRole = channelRole,
notificationsMuted = notificationsMuted,
status = status,
banExpires = banExpires,
)

internal suspend fun MemberEntity.toModel(getUser: suspend (userId: String) -> User): Member = Member(
Expand All @@ -45,4 +46,5 @@ internal suspend fun MemberEntity.toModel(getUser: suspend (userId: String) -> U
channelRole = channelRole,
notificationsMuted = notificationsMuted,
status = status,
banExpires = banExpires,
)

0 comments on commit 4935df2

Please sign in to comment.