init: init proj
This commit is contained in:
32
DDYSClient/Models/ContentCategory.swift
Normal file
32
DDYSClient/Models/ContentCategory.swift
Normal file
@@ -0,0 +1,32 @@
|
||||
import Foundation
|
||||
|
||||
enum ContentCategory: String, CaseIterable, Identifiable, Codable {
|
||||
case movie = "movie"
|
||||
case series = "series"
|
||||
case variety = "variety"
|
||||
case anime = "anime"
|
||||
|
||||
var id: String { rawValue }
|
||||
|
||||
var displayName: String {
|
||||
switch self {
|
||||
case .movie: return "电影"
|
||||
case .series: return "电视剧"
|
||||
case .variety: return "综艺"
|
||||
case .anime: return "动漫"
|
||||
}
|
||||
}
|
||||
|
||||
var pathPrefix: String {
|
||||
"/\(rawValue)"
|
||||
}
|
||||
|
||||
var icon: String {
|
||||
switch self {
|
||||
case .movie: return "film"
|
||||
case .series: return "tv"
|
||||
case .variety: return "theatermasks"
|
||||
case .anime: return "sparkles"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user