From 6ba4e967d5dfb5d3c7bb97a0f2662f3180595563 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Thu, 19 Mar 2026 15:17:38 -0500 Subject: feat: implement support for projects, lists, and pastes --- Hutch/Models/Paste.swift | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Hutch/Models/Paste.swift (limited to 'Hutch/Models/Paste.swift') diff --git a/Hutch/Models/Paste.swift b/Hutch/Models/Paste.swift new file mode 100644 index 0000000..b4c8f18 --- /dev/null +++ b/Hutch/Models/Paste.swift @@ -0,0 +1,29 @@ +import Foundation + +struct PasteFile: Codable, Sendable, Hashable, Identifiable { + let filename: String? + let hash: String + let contents: URL? + + var id: String { hash } +} + +struct Paste: Codable, Sendable, Identifiable, Hashable { + let id: String + let created: Date + let visibility: Visibility + let files: [PasteFile] + let user: Entity +} + +struct PasteUploadDraft: Identifiable, Equatable, Sendable { + let id: UUID + var filename: String + var contents: String + + init(id: UUID = UUID(), filename: String = "", contents: String = "") { + self.id = id + self.filename = filename + self.contents = contents + } +} -- cgit v1.2.3