backbone-events 0.4.0

Events core + the sale/booth/crm/sms/desk overlay — registrations under one authoritative seat counter, the sale seam (order-minted registrations, forward-only paid heal, SO-cancel mirror cascade), booth bookings with the DB exclusivity wall, closed-vocabulary lead rules through a host sink port, the dual-channel (mail/sms) self-arming scheduler, and the exact-match desk verb (Odoo event port, core + overlay)
//! Repository implementations
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Uses backbone-orm's `DatabaseOperations<T>` trait.

mod booth_category_repository;
mod booth_repository;
mod type_booth_repository;
mod booth_booking_repository;
mod event_repository;
mod event_type_repository;
mod lead_provenance_repository;
mod lead_provenance_registration_repository;
mod lead_request_repository;
mod lead_rule_repository;
mod lead_rule_predicate_repository;
mod mail_repository;
mod mail_registration_repository;
mod mail_slot_repository;
mod question_repository;
mod question_answer_repository;
mod registration_question_repository;
mod registration_repository;
mod registration_answer_repository;
mod slot_repository;
mod stage_repository;
mod tag_category_repository;
mod tag_repository;
mod ticket_repository;
mod type_mail_repository;

// Custom persistence modules
// <<< CUSTOM
// The shared-audit-trail funnel. Inside the markers so a regeneration
// cannot drop the declaration and leave the file orphaned.
pub mod audit;
// Hand-written repositories carrying the verbs' transactional SQL
// (user-owned; see metaphor.codegen.yaml). The generated CRUD
// repositories keep their own files; these are the verb layer's.
pub mod seat_repository;
pub mod event_command_repository;
pub mod scheduler_repository;
pub mod sale_seam_repository;
pub mod booth_command_repository;
pub mod lead_command_repository;
// END CUSTOM

// Re-exports
pub use booth_category_repository::BoothCategoryRepository;
pub use booth_repository::BoothRepository;
pub use type_booth_repository::TypeBoothRepository;
pub use booth_booking_repository::BoothBookingRepository;
pub use event_repository::EventRepository;
pub use event_type_repository::EventTypeRepository;
pub use lead_provenance_repository::LeadProvenanceRepository;
pub use lead_provenance_registration_repository::LeadProvenanceRegistrationRepository;
pub use lead_request_repository::LeadRequestRepository;
pub use lead_rule_repository::LeadRuleRepository;
pub use lead_rule_predicate_repository::LeadRulePredicateRepository;
pub use mail_repository::MailRepository;
pub use mail_registration_repository::MailRegistrationRepository;
pub use mail_slot_repository::MailSlotRepository;
pub use question_repository::QuestionRepository;
pub use question_answer_repository::QuestionAnswerRepository;
pub use registration_question_repository::RegistrationQuestionRepository;
pub use registration_repository::RegistrationRepository;
pub use registration_answer_repository::RegistrationAnswerRepository;
pub use slot_repository::SlotRepository;
pub use stage_repository::StageRepository;
pub use tag_category_repository::TagCategoryRepository;
pub use tag_repository::TagRepository;
pub use ticket_repository::TicketRepository;
pub use type_mail_repository::TypeMailRepository;

// Re-export backbone-orm types
pub use backbone_orm::repository::{
    DatabaseOperations, PostgresRepository,
    PaginationParams, PaginationInfo, PaginatedResult,
    FilterParams, FilterCondition, SortParams, SortDirection,
};

// Re-export custom persistence types
// <<< CUSTOM
pub use seat_repository::{RegisterCommand, RegistrationRow, SaleLink, SeatCounts, SeatRepository};

/// Re-bind the ambient org scope onto a connection this module opened
/// itself (a fresh pool transaction). With no ambient scope the
/// transaction stays plain — the module never invents one.
pub(crate) async fn relay_ambient_scope(
    conn: &mut sqlx::PgConnection,
) -> Result<(), sqlx::Error> {
    if let Some(scope) = backbone_orm::org_scope::current_org_scope() {
        backbone_orm::org_scope::bind_org_scope_on(conn, &scope).await?;
    }
    Ok(())
}
pub use event_command_repository::{
    CreateEventInput, EventCommandRepository, EventRow, PatchEventInput,
};
pub use scheduler_repository::{DueReceipt, SchedulerRepository, SchedulerRow};
pub use sale_seam_repository::{SaleSeamRepository, SeamOutcome};
pub use booth_command_repository::{BoothBookingRow, BoothCommandRepository, BoothRow};
pub use lead_command_repository::{
    EligibleRegistration, LeadCommandRepository, LeadPredicateRow, LeadRequestRow, LeadRuleRow,
    PredicateInput,
};
// END CUSTOM