IDstring`validate:"required,ulid" bun:"type:CHAR(26),pk,nullzero,notnull,unique"`// id of this item in the database
CreatedAttime.Time`validate:"required" bun:",nullzero,notnull,default:current_timestamp"`// when was item created
UpdatedAttime.Time`validate:"required" bun:",nullzero,notnull,default:current_timestamp"`// when was item last updated
StatusIDstring`validate:"omitempty,ulid" bun:"type:CHAR(26),nullzero"`// ID of the status to which this is attached
URLstring`validate:"required_without=RemoteURL,omitempty,url" bun:",nullzero"`// Where can the attachment be retrieved on *this* server
RemoteURLstring`validate:"required_without=URL,omitempty,url" bun:",nullzero"`// Where can the attachment be retrieved on a remote server (empty for local media)
TypeFileType`validate:"oneof=Image Gif Audio Video Unknown" bun:",notnull"`// Type of file (image/gif/audio/video)
FileMetaFileMeta`validate:"required" bun:",nullzero,notnull"`// Metadata about the file
AccountIDstring`validate:"required,ulid" bun:"type:CHAR(26),nullzero,notnull"`// To which account does this attachment belong
Account*Account`validate:"-" bun:"rel:has-one"`// Account corresponding to accountID
Descriptionstring`validate:"-" bun:",nullzero"`// Description of the attachment (for screenreaders)
ScheduledStatusIDstring`validate:"omitempty,ulid" bun:"type:CHAR(26),nullzero"`// To which scheduled status does this attachment belong
Blurhashstring`validate:"required_if=Type Image,required_if=Type Gif,required_if=Type Video" bun:",nullzero"`// What is the generated blurhash of this attachment
ProcessingStatusReceivedProcessingStatus=0// ProcessingStatusReceived indicates the attachment has been received and is awaiting processing. No thumbnail available yet.
ProcessingStatusProcessingProcessingStatus=1// ProcessingStatusProcessing indicates the attachment is currently being processed. Thumbnail is available but full media is not.
ProcessingStatusProcessedProcessingStatus=2// ProcessingStatusProcessed indicates the attachment has been fully processed and is ready to be served.
ProcessingStatusErrorProcessingStatus=666// ProcessingStatusError indicates something went wrong processing the attachment and it won't be tried again--these can be deleted.