WatchThemeModel.swift
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// 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"
}
}