29 lines
462 B
Swift
29 lines
462 B
Swift
import Foundation
|
|
|
|
enum SortCriteria: Int, CaseIterable {
|
|
case id = 0
|
|
case name = 1
|
|
case count = 2
|
|
case match = 3
|
|
|
|
var text: String {
|
|
switch self {
|
|
case .id:
|
|
return "Id"
|
|
case .name:
|
|
return "Name"
|
|
case .count:
|
|
return "Count"
|
|
case .match:
|
|
return "Match"
|
|
}
|
|
}
|
|
}
|
|
|
|
extension SortCriteria: Identifiable {
|
|
|
|
var id: Int {
|
|
rawValue
|
|
}
|
|
}
|