add models module: shared types for accounts, messages, threads, sync

fix Package.swift: remove NIOIMAPCore product reference (only NIOIMAP is exported by swift-nio-imap)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 18:11:24 +01:00
parent 9c3d02ae45
commit f37b287f5e
12 changed files with 198 additions and 4 deletions
@@ -0,0 +1,26 @@
import Foundation
public struct ThreadSummary: Sendable, Identifiable, Equatable {
public var id: String
public var accountId: String
public var subject: String?
public var lastDate: Date
public var messageCount: Int
public var unreadCount: Int
public var senders: String
public var snippet: String?
public init(
id: String, accountId: String, subject: String?, lastDate: Date,
messageCount: Int, unreadCount: Int, senders: String, snippet: String?
) {
self.id = id
self.accountId = accountId
self.subject = subject
self.lastDate = lastDate
self.messageCount = messageCount
self.unreadCount = unreadCount
self.senders = senders
self.snippet = snippet
}
}