WatchThemeModel.swift 1.4 KB
//
//  WatchThemeModel.swift
//  hippo
//
//  Created by 权海 on 2026/6/26.
//

struct WatchThemeModel: Codable, Equatable {
    var id: Int?
    var userId: Int?
    var themeName: String?
    var isOfficial: Int?
    
    var energeticTitle: String?
    var energeticImageURL: String?
    
    var normalTitle: String?
    var normalImageURL: String?
    
    var slightStressTitle: String?
    var slightStressImageURL: String?
    
    var stressfulTitle: String?
    var stressfulImageURL: String?
    
    static func == (lhs: Self, rhs: Self) -> Bool{
        lhs.energeticImageURL == rhs.energeticImageURL &&
        lhs.normalImageURL == rhs.normalImageURL &&
        lhs.slightStressImageURL == rhs.slightStressImageURL &&
        lhs.stressfulImageURL == rhs.stressfulImageURL
    }
    
    enum CodingKeys: String, CodingKey {
        case id
        case userId =   "user_id"
        case themeName  =   "theme_name"
        case isOfficial =   "is_official"
        case energeticTitle =   "energetic_description"
        case energeticImageURL  =   "energetic_image"
        case normalTitle    =   "normal_description"
        case normalImageURL =   "normal_image"
        case slightStressTitle  =   "slight_stressful_description"
        case slightStressImageURL   =   "slight_stressful_image"
        case stressfulTitle =   "stressful_description"
        case stressfulImageURL  =   "stressful_image"
    }
}