//
//  LNFeedResponse.swift
//  Gami
//
//  Created by OneeChan on 2026/3/4.
//

import Foundation
import AutoCodable


enum LNFeedMediaType: Int, Decodable {
    case image = 0
    case video = 1
}

@AutoCodable
class LNFeedMediaVO: Decodable {
    var url: String = ""
    var type: LNFeedMediaType = .image
    var videoCover: String = ""
    
    init () { }
}

@AutoCodable
class LNFeedItemVO: Decodable {
    var id: String = ""
    var createdAt: Int64 = 0
    var updatedAt: Int64 = 0
    var textContent: String = ""
    var medias: [LNFeedMediaVO] = []
    var likeCount: Int = 0
    var userNo: String = ""
    var nickname: String = ""
    var avatar: String = ""
    var liked: Bool = false
    var commentCount: Int = 0
}

@AutoCodable
class LNFeedListResponse: Decodable {
    var list: [LNFeedItemVO] = []
    var next: String = ""
}

@AutoCodable
class LNFeedDetailVO: Decodable {
    var id: String = ""
    var createdAt: Int = 0
    var updatedAt: Int = 0
    var textContent: String = ""
    var medias: [LNFeedMediaVO] = []
    var likeCount: Int = 0
    var userNo: String = ""
    var nickname: String = ""
    var avatar: String = ""
    var liked: Bool = false
    var commentCount: Int = 0
}

@AutoCodable
class LNFeedCommentVO: Decodable {
    var id: String = ""
    var createdAt: Int = 0
    var updatedAt: Int = 0
    var trendId: String = ""
    var commentPid: String = ""
    var avatar: String = ""
    var nickname: String = ""
    var userNo: String = ""
    var textContent: String = ""
    var likeCount: Int = 0
    
    init() { }
}

@AutoCodable
class LNFeedCommentListResponse: Decodable {
    var list: [LNFeedCommentVO] = []
    var next: String = ""
    var total: Int = 0
}

@AutoCodable
class LNFeedLikeResponse: Decodable {
    var like: Bool = false
    var likeCount: Int = 0
}
