页面样式调整

This commit is contained in:
weber
2025-08-14 15:39:21 +08:00
parent cd3fc03524
commit d8c091b19b
13 changed files with 231 additions and 25 deletions

View File

@@ -0,0 +1,88 @@
package com.aiosman.ravenow.data
import com.aiosman.ravenow.AppStore
import com.aiosman.ravenow.data.api.ApiClient
import com.aiosman.ravenow.entity.AgentEntity
import com.aiosman.ravenow.entity.CreatorEntity
import com.aiosman.ravenow.entity.ProfileEntity
import com.aiosman.ravenow.entity.RoomEntity
import com.google.gson.annotations.SerializedName
data class Room(
@SerializedName("id")
val id: Int,
@SerializedName("name")
val name: String,
@SerializedName("description")
val description: String,
@SerializedName("trtcRoomId")
val trtcRoomId: String,
@SerializedName("trtcType")
val trtcType: String,
@SerializedName("cover")
val cover: String,
@SerializedName("avatar")
val avatar: String,
@SerializedName("recommendBanner")
val recommendBanner: String,
@SerializedName("isRecommended")
val isRecommended: Boolean,
@SerializedName("allowInHot")
val allowInHot: Boolean,
@SerializedName("creator")
val creator: Creator,
@SerializedName("userCount")
val userCount: Int,
@SerializedName("maxMemberLimit")
val maxMemberLimit: Int,
@SerializedName("canJoin")
val canJoin: Boolean,
@SerializedName("canJoinCode")
val canJoinCode: Int
) {
fun toRoomtEntity(): RoomEntity {
return RoomEntity(
id= id,
name = name,
description = description ,
trtcRoomId = trtcRoomId,
trtcType = trtcType,
cover = cover,
avatar = avatar,
recommendBanner = recommendBanner,
isRecommended = isRecommended,
allowInHot = allowInHot,
creator = creator.toCreatorEntity(),
userCount = userCount,
maxMemberLimit = maxMemberLimit,
canJoin = canJoin,
canJoinCode = canJoinCode,
)
}
}
data class Creator(
@SerializedName("id")
val id: Int,
@SerializedName("userId")
val userId: String,
@SerializedName("trtcUserId")
val trtcUserId: String,
@SerializedName("profile")
val profile: Profile
){
fun toCreatorEntity(): CreatorEntity {
return CreatorEntity(
id = id,
userId = userId,
trtcUserId = trtcUserId,
profile = profile.toProfileEntity()
)
}
}

View File

@@ -10,6 +10,7 @@ import com.aiosman.ravenow.data.Comment
import com.aiosman.ravenow.data.DataContainer
import com.aiosman.ravenow.data.ListContainer
import com.aiosman.ravenow.data.Moment
import com.aiosman.ravenow.data.Room
import com.aiosman.ravenow.entity.ChatNotification
import com.google.gson.annotations.SerializedName
import okhttp3.MultipartBody
@@ -541,7 +542,11 @@ interface RaveNowAPI {
@POST("outside/rooms")
suspend fun createGroupChat(@Body body: CreateGroupChatRequestBody): Response<DataContainer<Unit>>
@GET("outside/rooms")
suspend fun getRooms(@Query("page") page: Int = 1,
@Query("pageSize") pageSize: Int = 20,
@Query("isRecommended") isRecommended: Int = 1,
): Response<ListContainer<Room>>