// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.31.1 package sqlc import ( "github.com/jackc/pgx/v5/pgtype" ) type AccountDeletionRequest struct { ID pgtype.UUID SubjectID pgtype.UUID Status string RequestedAt pgtype.Timestamptz CompletedAt pgtype.Timestamptz } type AssessmentCategoryCatalogBinding struct { OpeningID pgtype.UUID Specialization string Grade string TaskLanguages []string PublishedManifestSha256 []byte ReviewedBy string ReviewedAt pgtype.Timestamptz } type AssessmentCategoryOpening struct { ID pgtype.UUID Category string PolicyVersionID pgtype.UUID OpenedBy string RequiredFamilies int32 PublishedFamilies int32 OpenedAt pgtype.Timestamptz } type AssessmentFamily struct { ID pgtype.UUID FamilyKey string Version int32 Category string Specialization string Title string BundleName string Author string Reviewer pgtype.Text ReviewStatus string SeedGenerator []byte AnswerKey []byte Rubric []byte ContentSha256 []byte HashScheme int16 Lifecycle string CreatedAt pgtype.Timestamptz PublishedAt pgtype.Timestamptz PublishedBy pgtype.Text RetiredAt pgtype.Timestamptz RetiredBy pgtype.Text } type CandidateEffectivePublication struct { UserID pgtype.UUID Fields []string PublishedAt pgtype.Timestamptz Version int64 } type CandidateHiddenOrganization struct { UserID pgtype.UUID OrganizationID pgtype.UUID HiddenAt pgtype.Timestamptz } type CandidatePrivacyEvent struct { ID pgtype.UUID UserID pgtype.UUID Kind string OccurredAt pgtype.Timestamptz Fields []string ConsentRecordID pgtype.UUID ConsentPurpose pgtype.Text OrganizationID pgtype.UUID } type CandidateProfile struct { UserID pgtype.UUID Version int64 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type CandidateProfileClaim struct { UserID pgtype.UUID Kind string Ordinal int16 Value []byte Status string Origin string TrustLevel int16 Quote pgtype.Text ExtractionVersion pgtype.Text ConfirmedAt pgtype.Timestamptz } type CandidateProfileHistory struct { UserID pgtype.UUID Version int64 ChangedAt pgtype.Timestamptz Snapshot []byte } type CandidateProfileOverlapConfirmation struct { UserID pgtype.UUID FirstIndex int16 SecondIndex int16 FirstStartedOn string FirstEndedOn pgtype.Text SecondStartedOn string SecondEndedOn pgtype.Text } type CandidatePublication struct { UserID pgtype.UUID State string Fields []string ConsentRecordID pgtype.UUID ConsentPurpose pgtype.Text PublishedAt pgtype.Timestamptz ClosedAt pgtype.Timestamptz Version int64 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type CandidateQuestionnaire struct { UserID pgtype.UUID Version int64 WorkFormats []string CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type CandidateQuestionnaireSpecialization struct { UserID pgtype.UUID Ordinal int16 Specialization string SelfAssessedGrade string TaskLanguages []string Stack []string CommercialMonths pgtype.Int4 AcademicMonths pgtype.Int4 } type CandidateSearchStatus struct { UserID pgtype.UUID Status string ConfirmedAt pgtype.Timestamptz LapsesAt pgtype.Timestamptz PolicyVersionID pgtype.UUID Version int64 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type CompanyCardViewQuotaUsage struct { OrganizationID pgtype.UUID CandidateID pgtype.UUID LastSeenAt pgtype.Timestamptz PolicyVersionID pgtype.UUID VerificationLevel string VerificationBasis string VerificationChangedAt pgtype.Timestamptz QuotaTier string } type CompanyInvitationQuotaUsage struct { OrganizationID pgtype.UUID InvitationID pgtype.UUID ReservedAt pgtype.Timestamptz PolicyVersionID pgtype.UUID VerificationLevel string VerificationBasis string VerificationChangedAt pgtype.Timestamptz QuotaTier string } type ConsentRecord struct { ID pgtype.UUID SubjectID pgtype.UUID Purpose string TextVersion string TextHash []byte PublishedTextHash []byte Source string OrganizationID pgtype.UUID OrganizationName pgtype.Text FieldSet []string InvitationID pgtype.UUID InvitationTermsVersion pgtype.Int8 GrantedAt pgtype.Timestamptz RevokedAt pgtype.Timestamptz RevocationSource pgtype.Text RegistrationVersion pgtype.Int8 } type ConsentText struct { Purpose string Version string Body string BodySha256 []byte Kind string PublishedAt pgtype.Timestamptz } type ConsumerDeadLetter struct { ID int64 ConsumerName string Topic string KafkaPartition int32 KafkaOffset int64 EventID pgtype.UUID EventType pgtype.Text ErrorClass string Reason string Attempts int32 ValueSize int32 ValueSha256 []byte DeadLetteredAt pgtype.Timestamptz } type ConsumerProcessedEvent struct { ConsumerName string EventID pgtype.UUID ProcessedAt pgtype.Timestamptz } type Delivery struct { ID pgtype.UUID SourceEventID pgtype.UUID RecipientUserID pgtype.UUID RecipientEmail string Kind string TemplateVersion string Subject string TextBody string HtmlBody string ContentSha256 []byte Provider string ProviderAccount string IdempotencyKey string Status string AttemptCount int32 NextAttemptAt pgtype.Timestamptz LastAttemptAt pgtype.Timestamptz ProviderMessageID pgtype.Text Version int64 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz // The token whose link the body carries; set for verification and password reset mail, NULL for notifications. The worker checks the token before it sends. EmailTokenID pgtype.UUID // Why a cancelled delivery was not sent; set exactly when the status is cancelled. CancelReason pgtype.Text // Lease owner of the sending worker that claimed the delivery; NULL when no worker holds it. ClaimOwner pgtype.UUID // When the lease of claim_owner expires; another worker may claim the delivery after it. ClaimedUntil pgtype.Timestamptz // When the first request of this delivery was started, by the database clock; the provider keeps the idempotency key for a window counted from here. FirstSendStartedAt pgtype.Timestamptz // Consecutive failures of the sending worker on this row (not provider answers); reset by a recorded attempt. FailureCount int32 // Set when the bodies of a token mail were cleared after the delivery reached a terminal status, so a database dump holds no live or dead token. BodyRedactedAt pgtype.Timestamptz // Database time of the latest audited operator authorization to retry a terminal unknown delivery; it does not replace the original send history. ManualRetryAuthorizedAt pgtype.Timestamptz // Database time when the first provider call of the latest manual authorization started; this is a single-use/recovery marker and never resets the provider deduplication window. ManualRetryStartedAt pgtype.Timestamptz // Attempt count when the latest provider call started. Equality with attempt_count means its result was not recorded; a greater attempt_count means a provider result was stored after that send-start. SendStartedAttemptCount pgtype.Int4 } type DeliveryAttempt struct { DeliveryID pgtype.UUID AttemptNumber int32 AttemptedAt pgtype.Timestamptz Outcome string Rejection pgtype.Text ProviderCode pgtype.Text ProviderMessageID pgtype.Text RetryAfterNs int64 StatusAfter string NextAttemptAt pgtype.Timestamptz } // Append-only record of an operator decision to retry a terminal unknown mail delivery after its provider deduplication window. No foreign key so history survives account deletion. type DeliveryRetryDecision struct { DecisionID int64 // Opaque ID of the delivery whose current unknown attempt was authorized for another send cycle. DeliveryID pgtype.UUID AttemptCount int32 // Operator handle in the form operator:; never an email address or credential. Actor string // Must be true: after the provider key expires, reusing it does not guarantee deduplication. DuplicateRiskAcknowledged bool // True when this decision also cleared an expired worker lease after a manual send began but its result was not recorded. PreviousLeaseExpired bool DecidedAt pgtype.Timestamptz } type EmailToken struct { ID pgtype.UUID UserID pgtype.UUID Purpose string TokenHash []byte RegistrationVersion int64 CreatedAt pgtype.Timestamptz ExpiresAt pgtype.Timestamptz ConsumedAt pgtype.Timestamptz InvalidatedAt pgtype.Timestamptz PendingPasswordHash pgtype.Text PendingScenario pgtype.Text PendingOnboardingStep pgtype.Text } type IdempotencyRecord struct { ScopeHash []byte Fingerprint []byte CreatedAt pgtype.Timestamptz ExpiresAt pgtype.Timestamptz } type MailQuotaReservation struct { ID pgtype.UUID DeliveryID pgtype.UUID Provider string ProviderAccount string DayStart pgtype.Date MonthStart pgtype.Date Recipients int64 ReservedAt pgtype.Timestamptz ReleasedAt pgtype.Timestamptz SettledOutcome pgtype.Text SettledAt pgtype.Timestamptz } type MailQuotaUsage struct { Provider string ProviderAccount string PeriodKind string PeriodStart pgtype.Date UsedRecipients int64 ProviderExhaustedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type MailRequest struct { ID pgtype.UUID RecipientUserID pgtype.UUID Kind string Subject string Body string LinkPath string CreatedAt pgtype.Timestamptz } type Membership struct { ID pgtype.UUID OrganizationID pgtype.UUID UserID pgtype.UUID Role string State string CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type Organization struct { ID pgtype.UUID Name string Description pgtype.Text Sphere pgtype.Text ContactWebsite pgtype.Text ContactEmail pgtype.Text ContactPhone pgtype.Text ContactTelegram pgtype.Text VerificationLevel string VerificationBasis string VerificationChangedAt pgtype.Timestamptz Version int64 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type OrganizationCreationResult struct { ScopeHash []byte Snapshot []byte } type OrganizationNeed struct { ID pgtype.UUID OrganizationID pgtype.UUID CurrentVersion int64 RequirementsVersion int64 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type OrganizationNeedVersion struct { OrganizationID pgtype.UUID NeedID pgtype.UUID Version int64 Snapshot []byte } type OrganizationRepresentative struct { OrganizationID pgtype.UUID Ordinal int16 Name string JobTitle string } type OutboxEvent struct { Position pgtype.Int8 EventID pgtype.UUID EventType string SchemaVersion int32 AggregateType string AggregateID pgtype.UUID AggregateVersion int64 Payload []byte OccurredAt pgtype.Timestamptz PublishedAt pgtype.Timestamptz } type PolicyVersion struct { ID pgtype.UUID PolicyKey string Version int32 Kind string EffectiveAt pgtype.Timestamptz Author string Document []byte DocumentSha256 []byte CreatedAt pgtype.Timestamptz } type ScheduledJob struct { ID int64 Kind string DedupKey string Payload []byte DueAt pgtype.Timestamptz AvailableAt pgtype.Timestamptz Status string Attempts int32 MaxAttempts pgtype.Int4 LeaseOwner pgtype.UUID LeaseExpiresAt pgtype.Timestamptz StartedAt pgtype.Timestamptz LastErrorClass pgtype.Text CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type Session struct { ID pgtype.UUID UserID pgtype.UUID TokenHash []byte CreatedAt pgtype.Timestamptz LastSeenAt pgtype.Timestamptz ExpiresAt pgtype.Timestamptz RevokedAt pgtype.Timestamptz } type User struct { ID pgtype.UUID Email string EmailNormalized string PasswordHash string Scenario string OnboardingStep string EmailVerifiedAt pgtype.Timestamptz RegistrationVersion int64 LastRegisteredAt pgtype.Timestamptz Version int64 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz }