//
//  AppUpgradeInfo.swift
//  punchnet
//
//  Created by 安礼成 on 2026/4/17.
//
import Foundation

// 应用升级信息
struct AppUpgradeInfo: Codable, Identifiable {
    var id = UUID().uuidString
    
    let hasUpdate: Bool
    let latestVersion: String
    let latestBuild: Int
    let forceUpdate: Bool
    let downloadUrl: String
    let releaseNotes: String
    let minSupportedVersion: String
    let publishTime: Int
    
    enum CodingKeys: String, CodingKey {
        case hasUpdate = "has_update"
        case latestVersion = "latest_version"
        case latestBuild = "latest_build"
        case forceUpdate = "force_update"
        case downloadUrl = "download_url"
        case releaseNotes = "release_notes"
        case minSupportedVersion = "min_supported_version"
        case publishTime = "publish_time"
    }
}
