FezPost
final class FezPost : Model, Searchable, @unchecked Sendable
extension FezPost: ContentFilterable
extension FezPost: Reportable
An individual post within a FriendlyFez discussion. A FezPost must contain
text content and may also contain image content, unless the Fez is of type FezType.closed,
in which case the post may not contain images.
See
See Also: FezPostData the DTO for returning info on FezPosts. FezPostData is also a member ofFezData.
See
See Also: CreateFezPostSchema the Migration for creating the FezPost table in the database.-
Declaration
Swift
static let schema: String
-
The post’s ID.
Declaration
Swift
@FezPost .ID var id: Int? { get set } -
The text content of the post.
Declaration
Swift
@FezPost .Field var text: String { get set } -
The filename of any image content of the post. FezPosts are limited to one image, and “closed” Fez types cannot have any.
Declaration
Swift
@FezPost .OptionalField var image: String? { get set } -
Moderators can set several statuses on fezPosts that modify editability and visibility.
Declaration
Swift
@FezPost .Enum var moderationStatus: ContentModerationStatus { get set } -
Timestamp of the model’s creation, set automatically.
Declaration
Swift
@FezPost .Timestamp var createdAt: Date? { get set } -
Timestamp of the model’s last update, set automatically.
Declaration
Swift
@FezPost .Timestamp var updatedAt: Date? { get set } -
Timestamp of the model’s soft-deletion, set automatically.
Declaration
Swift
@FezPost .Timestamp var deletedAt: Date? { get set }
-
The
FriendlyFezto which the post belongs.Declaration
Swift
@FezPost .Parent var fez: FriendlyFez { get set } -
The post’s author.
Declaration
Swift
@FezPost .Parent var author: User { get set }
-
Used by Fluent
Declaration
Swift
init() -
Initializes a new FezPost.
Declaration
Swift
init( fez: FriendlyFez, authorID: UUID, text: String, image: String? ) throwsParameters
fezIDThe ID of the post’s FriendlyFez.
authorIDThe ID of the author of the post.
textThe text content of the post.
imageThe filename of any image content of the post.
-
Declaration
Swift
func contentTextStrings() -> [String] -
The report type for
FezPostreports.Declaration
Swift
var reportType: ReportType { get } -
Standardizes how to get the author ID of a Reportable object.
Declaration
Swift
var authorUUID: UUID { get } -
No auto quarantine for fez posts.
Declaration
Swift
var autoQuarantineThreshold: Int { get }
View on GitHub