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 of FezData.

See

See Also: CreateFezPostSchema the Migration for creating the FezPost table in the database.

Properties

  • id

    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 }

Relations

Initialization