Table of Contents

Class RunScheduledMailRulesJobPayload

Namespace
MailFathom.Application.Jobs.Payloads
Assembly
MailFathom.Application.dll

Points one job at a whole account, and at nothing inside its mailbox.

public sealed record RunScheduledMailRulesJobPayload : IJobPayload, IEquatable<RunScheduledMailRulesJobPayload>
Inheritance
RunScheduledMailRulesJobPayload
Implements
Inherited Members

Remarks

The account identifier is the one this deployment generated for a mailbox, so the document carries nothing derived from a message and nothing that could become one: there is no property here for a folder, an occurrence, or a subject. What the work reads about the mailbox it reads from committed local state.

It names the account by its generated identifier, which names one mailbox across the deployment, and this document is read by work that then writes rows about that account. The identifier names nothing outside this deployment, so carrying it discloses nothing an operator reading a queued job may not see.

The properties are primitives rather than the domain value objects they came from, because this record is the stored document — one jsonb column an operator reads when they ask what a queued job is. Rebuilding the identity is ToAccountId(), which validates it the way the domain type does.

Properties

AccountId

Gets the account the work is about.

JobType

Gets the job type this payload is the one contract of.

Methods

For(MailAccountId)

Describes one account as the document a job carries.

ToAccountId()

Rebuilds the generated account identifier this payload names.