feat(mail-ingest): tables for forwarded booking mails and their bookings

Five tables carry the mail import: forwarding addresses (token hash plus the
encrypted token), a person's switches, the readers' cursor and lease, every
mail as it arrived, and each booking read from it with its checks and fate.
Repositories read the trips a booking may go to by column, so the import
weighs a booking without reaching into five other domains.
This commit is contained in:
Maurice
2026-11-13 15:30:07 +01:00
parent 53ebc9d632
commit baa906fb6b
29 changed files with 2118 additions and 4 deletions
@@ -63,7 +63,10 @@ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest';
// + storage_release_queue: category, key, due_at (a queued release is only ever written whole, by the release queue).
// + flight_live_states: callsign, service_date, origin, destination (a flight's state is always found and
// written by its key).
const KNOWN_UNINITIALISED_NOT_NULL_SCALARS = 615;
// + mail_ingest_addresses: id, token_hash, token_enc, user_id; mail_ingest_prefs: id, user_id; mail_ingest_cursor:
// id, transport, mailbox; mail_ingest_messages: id, transport, dedupe_hash, user_id, size; mail_ingest_candidates:
// id, message_id, user_id (each row is written whole by the mail import, which always knows all of them).
const KNOWN_UNINITIALISED_NOT_NULL_SCALARS = 632;
describe('entity class fields never carry a NaN initialiser (task-4-review-shape.md, Important 1)', () => {
it('CLASSFIELD-001: new X() has no own property whose value is NaN, across all 133 entities', () => {