// Status represents a user-created 'post' or 'status' in the database, either remote or local
typeStatusstruct{
IDstring`validate:"required,ulid" bun:"type:CHAR(26),pk,nullzero,notnull,unique"`// id of this item in the database
CreatedAttime.Time`validate:"-" bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"`// when was item created
UpdatedAttime.Time`validate:"-" bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"`// when was item last updated
URIstring`validate:"required,url" bun:",unique,nullzero,notnull"`// activitypub URI of this status
URLstring`validate:"url" bun:",nullzero"`// web url for viewing this status
Contentstring`validate:"-" bun:""`// content of this status; likely html-formatted but not guaranteed
AttachmentIDs[]string`validate:"dive,ulid" bun:"attachments,array"`// Database IDs of any media attachments associated with this status
Attachments[]*MediaAttachment`validate:"-" bun:"attached_media,rel:has-many"`// Attachments corresponding to attachmentIDs
TagIDs[]string`validate:"dive,ulid" bun:"tags,array"`// Database IDs of any tags used in this status
Tags[]*Tag`validate:"-" bun:"attached_tags,m2m:status_to_tags"`// Tags corresponding to tagIDs. https://bun.uptrace.dev/guide/relations.html#many-to-many-relation
MentionIDs[]string`validate:"dive,ulid" bun:"mentions,array"`// Database IDs of any mentions in this status
Mentions[]*Mention`validate:"-" bun:"attached_mentions,rel:has-many"`// Mentions corresponding to mentionIDs
EmojiIDs[]string`validate:"dive,ulid" bun:"emojis,array"`// Database IDs of any emojis used in this status
Emojis[]*Emoji`validate:"-" bun:"attached_emojis,m2m:status_to_emojis"`// Emojis corresponding to emojiIDs. https://bun.uptrace.dev/guide/relations.html#many-to-many-relation
Localbool`validate:"-" bun:",notnull,default:false"`// is this status from a local account?
AccountIDstring`validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull"`// which account posted this status?
Account*Account`validate:"-" bun:"rel:belongs-to"`// account corresponding to accountID
AccountURIstring`validate:"required,url" bun:",nullzero,notnull"`// activitypub uri of the owner of this status
InReplyToIDstring`validate:"required_with=InReplyToURI InReplyToAccountID,omitempty,ulid" bun:"type:CHAR(26),nullzero"`// id of the status this status replies to
InReplyToURIstring`validate:"required_with=InReplyToID InReplyToAccountID,omitempty,url" bun:",nullzero"`// activitypub uri of the status this status is a reply to
InReplyToAccountIDstring`validate:"required_with=InReplyToID InReplyToURI,omitempty,ulid" bun:"type:CHAR(26),nullzero"`// id of the account that this status replies to
InReplyTo*Status`validate:"-" bun:"-"`// status corresponding to inReplyToID
InReplyToAccount*Account`validate:"-" bun:"rel:belongs-to"`// account corresponding to inReplyToAccountID
BoostOfIDstring`validate:"required_with=BoostOfAccountID,omitempty,ulid" bun:"type:CHAR(26),nullzero"`// id of the status this status is a boost of
BoostOfAccountIDstring`validate:"required_with=BoostOfID,omitempty,ulid" bun:"type:CHAR(26),nullzero"`// id of the account that owns the boosted status
BoostOf*Status`validate:"-" bun:"-"`// status that corresponds to boostOfID
BoostOfAccount*Account`validate:"-" bun:"rel:belongs-to"`// account that corresponds to boostOfAccountID
ContentWarningstring`validate:"-" bun:",nullzero"`// cw string for this status
VisibilityVisibility`validate:"oneof=public unlocked followers_only mutuals_only direct" bun:",nullzero,notnull"`// visibility entry for this status
Sensitivebool`validate:"-" bun:",notnull,default:false"`// mark the status as sensitive?
Languagestring`validate:"-" bun:",nullzero"`// what language is this status written in?
CreatedWithApplicationIDstring`validate:"required_if=Local true,omitempty,ulid" bun:"type:CHAR(26),nullzero"`// Which application was used to create this status?
CreatedWithApplication*Application`validate:"-" bun:"rel:belongs-to"`// application corresponding to createdWithApplicationID
ActivityStreamsTypestring`validate:"required" bun:",nullzero,notnull"`// What is the activitystreams type of this status? See: https://www.w3.org/TR/activitystreams-vocabulary/#object-types. Will probably almost always be Note but who knows!.
Textstring`validate:"-" bun:""`// Original text of the status without formatting
Pinnedbool`validate:"-" bun:",notnull,default:false"`// Has this status been pinned by its owner?
Federatedbool`validate:"-" bun:",notnull"`// This status will be federated beyond the local timeline(s)
Boostablebool`validate:"-" bun:",notnull"`// This status can be boosted/reblogged
Replyablebool`validate:"-" bun:",notnull"`// This status can be replied to
Likeablebool`validate:"-" bun:",notnull"`// This status can be liked/faved
}
// StatusToTag is an intermediate struct to facilitate the many2many relationship between a status and one or more tags.