ProfileEdit
final class ProfileEdit : Model, @unchecked Sendable
When a UserProfile is edited, a ProfileEdit is created and associated with the
profile. The ProfileEdit records the state of the profile just before the edit occurred.
This is done for accountability purposes and the data collected is intended to be viewable
only by users with an access level of .moderator or above.
See
See Also: CreateProfileEditSchema the Migration for creating the ProfileEdit table in the database.-
Declaration
Swift
static let schema: String
-
The edit’s ID.
Declaration
Swift
@ProfileEdit .ID var id: UUID? { get set } -
The
UserProfileDatacontents of the user’s profile, just before the edit.Declaration
Swift
@ProfileEdit .OptionalField var profileData: UserProfileUploadData? { get set } -
The user’s userImage filename, just before the edit.
Declaration
Swift
@ProfileEdit .OptionalField var profileImage: String? { get set } -
Timestamp of the model’s creation, set automatically.
Declaration
Swift
@ProfileEdit .Timestamp var createdAt: Date? { get set }
-
Declaration
Swift
init() -
Initializes a new ProfileEdit.
View on GitHub