feat: Begins breaking database out into it's own module, using dependencies

This commit is contained in:
2025-01-13 14:39:37 -05:00
parent 540b3e771a
commit 217dc5fa56
20 changed files with 1372 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
import Dependencies
import Foundation
public struct User: Identifiable, Codable, Sendable {
public struct User: Codable, Equatable, Identifiable, Sendable {
public var id: UUID
public var createdAt: Date
@@ -20,9 +20,9 @@ public struct User: Identifiable, Codable, Sendable {
@Dependency(\.uuid) var uuid
self.id = id ?? uuid()
self.createdAt = createdAt ?? date()
self.createdAt = createdAt ?? date.now
self.email = email
self.updatedAt = updatedAt ?? date()
self.updatedAt = updatedAt ?? date.now
self.username = username
}
}