Visual_Novel_iOS/crush/Crush/Src/Modules/Chat/Model/IMChatSetting.swift

61 lines
1.8 KiB
Swift
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// IMChatSetting.swift
// Crush
//
// Created by Leon on 2025/8/26.
//
struct IMChatSetting: Codable {
var aiId: Int? // aiId
var nickname: String? //
var sex: Sex? // 0,;1,;2,
var birthday: Int64? // ,
var whoAmI: String? //
var modelCode: String? // code
var modelName: String? //
/// codeCB0001
var bubbleCode: String?
var bubbleName: String? //
var backgroundImg: String? //
var isAutoPlayVoice: Int? // 1 0
///
var isDefaultBackground: Bool?
}
// MARK: -
enum UnlockType: String, Codable {
case member = "MEMBER" //
case heartbeatLevel = "HEARTBEAT_LEVEL" //
}
// MARK: -
struct IMChatBubble: Codable{
var id: Int? // id
var code: String? // code
var name: String? //
var color: String? // ?
/// Android use
var imgUrl: String? // url
/// iOS Use
var webImgUrl: String?
var unlockType: UnlockType? //
var unlockHeartbeatLevel: HeartbeatLevel? //
var isUnlock: Bool?
///
var isDefault: Bool?
func canUseTheBubble()->Bool{
return isUnlock.boolValue || isDefault.boolValue
}
}
struct IMChatBackground: Codable{
var backgroundId: Int? // id
var imgUrl: String? //
/// "720"
var width: String? //
/// "1024"
var height: String? //
var isDefault: Bool? //
var isSelected: Bool? //
}