feat: Begins breaking database out into it's own module, using dependencies
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user