diff options
| author | Christian Cleberg <[email protected]> | 2026-03-19 15:18:38 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-03-19 15:18:38 -0500 |
| commit | 659c76df9ff3926cb68886c16167808c23bd8f75 (patch) | |
| tree | 572bef546fcca19ad37bc1aa7cfb153eb2bf8eb7 /Hutch/Models/Paste.swift | |
| parent | ed48e72520c51e4635cd3840dbc569bdd74c950f (diff) | |
| parent | 6ba4e967d5dfb5d3c7bb97a0f2662f3180595563 (diff) | |
| download | hutch-2.tar.gz hutch-2.tar.bz2 hutch-2.zip | |
v2.0: Merge branch 'dev'v2
Diffstat (limited to 'Hutch/Models/Paste.swift')
| -rw-r--r-- | Hutch/Models/Paste.swift | 29 |
1 files changed, 29 insertions, 0 deletions
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 + } +} |
