Skip to content

Commit

Permalink
fix: add Hashable
Browse files Browse the repository at this point in the history
  • Loading branch information
isaced committed Aug 29, 2023
1 parent 24ad8d1 commit 2e15716
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Sources/V2exAPI/Models/V2Comment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

public struct V2Comment: Identifiable, Decodable, Equatable {
public struct V2Comment: Identifiable, Decodable, Hashable {

public let id: Int
public let content: String
Expand Down
2 changes: 1 addition & 1 deletion Sources/V2exAPI/Models/V2Member.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation

/// 会员
public struct V2Member : Decodable, Equatable {
public struct V2Member : Decodable, Hashable {

public var id: Int?
public var username: String?
Expand Down
2 changes: 1 addition & 1 deletion Sources/V2exAPI/Models/V2Node.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation

/// 节点
public struct V2Node: Identifiable, Decodable, Equatable {
public struct V2Node: Identifiable, Decodable, Hashable {

public let name: String
public let title: String?
Expand Down
2 changes: 1 addition & 1 deletion Sources/V2exAPI/Models/V2Notification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
/**
通知
*/
public struct V2Notification: Decodable, Identifiable, Equatable {
public struct V2Notification: Decodable, Identifiable, Hashable {
public let id, memberID, forMemberID: Int?
public let text, payload, payloadRendered: String?
public let created: Int?
Expand Down
2 changes: 1 addition & 1 deletion Sources/V2exAPI/Models/V2Token.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
/**
Token
*/
public struct V2Token: Decodable, Equatable {
public struct V2Token: Decodable, Equatable, Hashable {
public let token, scope: String?
public let expiration, goodForDays, totalUsed, lastUsed: Int?
public let created: Int?
Expand Down
2 changes: 1 addition & 1 deletion Sources/V2exAPI/Models/V2Topic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation

/// 话题
public struct V2Topic: Identifiable, Decodable, Equatable {
public struct V2Topic: Identifiable, Decodable, Hashable {

public let id: Int
public let node: V2Node?
Expand Down

0 comments on commit 2e15716

Please sign in to comment.