ProfileEdit
final class ProfileEdit : Model
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
@ID var id: UUID?
-
The
UserProfileData
contents of the user’s profile, just before the edit.Declaration
Swift
@OptionalField var profileData: UserProfileUploadData?
-
The user’s userImage filename, just before the edit.
Declaration
Swift
@OptionalField var profileImage: String?
-
Timestamp of the model’s creation, set automatically.
Declaration
Swift
@Timestamp var createdAt: Date?
-
Declaration
Swift
init()
-
Initializes a new ProfileEdit.