라이브 방 추가
This commit is contained in:
42
SodaLive/Sources/Live/Room/Chat/LiveRoomChat.swift
Normal file
42
SodaLive/Sources/Live/Room/Chat/LiveRoomChat.swift
Normal file
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// LiveRoomChat.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2023/08/14.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
enum LiveRoomChatType: String {
|
||||
case CHAT, DONATION, JOIN
|
||||
}
|
||||
|
||||
protocol LiveRoomChat {
|
||||
var type: LiveRoomChatType { get set }
|
||||
}
|
||||
|
||||
struct LiveRoomNormalChat: LiveRoomChat {
|
||||
let userId: Int
|
||||
let profileUrl: String
|
||||
let nickname: String
|
||||
let rank: Int
|
||||
let chat: String
|
||||
|
||||
var type: LiveRoomChatType = .CHAT
|
||||
}
|
||||
|
||||
struct LiveRoomDonationChat: LiveRoomChat {
|
||||
let profileUrl: String
|
||||
let nickname: String
|
||||
let chat: String
|
||||
let can: Int
|
||||
let donationMessage: String
|
||||
|
||||
var type: LiveRoomChatType = .DONATION
|
||||
}
|
||||
|
||||
struct LiveRoomJoinChat: LiveRoomChat {
|
||||
let nickname: String
|
||||
|
||||
var type: LiveRoomChatType = .JOIN
|
||||
}
|
Reference in New Issue
Block a user