22 lines
670 B
Swift
Raw Normal View History

2024-12-10 18:12:13 +00:00
public struct User: Identifiable, Hashable {
public let id: Int
public let name: String
public let score: Int
public let devRantSupporter: Bool
/// A small avatar for the rant views and comment views.
public let avatar: Avatar
2024-12-10 18:12:13 +00:00
/// A large avatar for the profile view.
2024-12-11 16:00:16 +00:00
public let avatarLarge: Avatar?
public init(id: Int, name: String, score: Int, devRantSupporter: Bool, avatar: User.Avatar, avatarLarge: User.Avatar?) {
self.id = id
self.name = name
self.score = score
self.devRantSupporter = devRantSupporter
self.avatar = avatar
self.avatarLarge = avatarLarge
}
2024-12-10 18:12:13 +00:00
}