| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- //
- // LNProfileResponse.swift
- // Lanu
- //
- // Created by OneeChan on 2025/11/12.
- //
- import Foundation
- import AutoCodable
- enum LNUserGender: Int, Decodable {
- case unknow = 0
- case male = 1
- case female = 2
-
- var desc: String {
- switch self {
- case .unknow: .init(key: "A00016")
- case .male: .init(key: "A00014")
- case .female: .init(key: "A00015")
- }
- }
- }
- @AutoCodable
- class LNUserInterestVO: Decodable {
- var code: String = ""
- var name: String = ""
-
- init(code: String, name: String) {
- self.code = code
- self.name = name
- }
- }
- @AutoCodable
- class LNUserProfileVO: Decodable, Copyable {
- var avatar: String = ""
- var nickname: String = ""
- var age: Int = 0
- var gender: LNUserGender = .unknow
- var star: Double = 0.0
- var area: String = ""
- var cover: String = ""
- var userNo: String = ""
- var languageNames: [String] = []
- var photos: [String] = []
- var intro: String = ""
- var playmate: Bool = false
- var skills: [LNGameMateSkillVO] = []
- var follow: Bool = false
- var fansCount: Int = 0
- var voiceBar: String = ""
- var birthday: Int = 0
- var rated: Bool = false
- var interests: [LNUserInterestVO] = []
- var distance: Double = 0
-
- var isAvailable: Bool {
- !avatar.isEmpty
- && !nickname.isEmpty
- }
-
- init() { }
- }
- @AutoCodable
- class LNUserRelationStatVO: Decodable {
- var fansCount: Int = 0
- var followCount: Int = 0
- var visitCount: Int = 0
-
- init() { }
- }
- enum LNUserVoiceBarState: Int, Decodable {
- case none = 0
- case review = 1
- case done = 2
- }
- @AutoCodable
- class LNUserVoiceStateVO: Decodable {
- var status: LNUserVoiceBarState = .none
- var voiceBar: String = ""
- var voiceBarDuration: Int = 0
-
- init() { }
- }
- @AutoCodable
- class LNMyProfileResponseVO: Decodable {
- var userProfile: LNUserProfileVO?
- var userFollowStat: LNUserRelationStatVO?
- var userVoice: LNUserVoiceStateVO?
- }
- @AutoCodable
- class LNUsersProfileResponse: Decodable {
- var list: [LNUserProfileVO] = []
- }
- @AutoCodable
- class LNProfileRandomInfoVO: Decodable {
- var nicknames: [String] = []
- var avatars: [String] = []
-
- init() { }
- }
- @AutoCodable
- class LNRandomProfileResponse: Decodable {
- var male: LNProfileRandomInfoVO = LNProfileRandomInfoVO()
- var female: LNProfileRandomInfoVO = LNProfileRandomInfoVO()
- }
- @AutoCodable
- class LNUserOnlineStateVO: Decodable {
- var userNo: String = ""
- var online: Bool = false
- }
- @AutoCodable
- class LNUserOnlineStateResponse: Decodable {
- var list: [LNUserOnlineStateVO] = []
- }
|