Domain Entities

1. Overview

The Event and Membership Administration System uses JPA (Jakarta Persistence API) entities to define its database schema. These entities are distributed across two repositories:

  • event-database - Primary entity repository containing 65 entities

  • wordpress-database - Legacy WordPress entities (15 entities - to be deprecated)

This documentation provides a comprehensive reference for all domain entities, organized by their functional area.

2. Entity Classification

The 79 total entities are organized into six main categories:

Category Entity Count Purpose

Common/Infrastructure

14

Cross-tenant entities used throughout the system

Event Management

35

Event-specific functionality including races, results, and participants

Membership Management

5

Membership tracking and criteria

Process Management

5

Workflow and business process definitions

Financial Management

7

Orders, payments, and general ledger

Legacy WordPress

15

WordPress and WooCommerce entities (to be deprecated within 6 months)

3. High-Level Entity Overview

entity-overview

4. Repository Structure

4.1. Event Database Repository

All primary entities are located in a single package:

Repository: https://github.com/christhonie/event-database
Package: za.co.idealogic.event.domain
Entity Count: 65

4.2. WordPress Database Repository

Legacy WordPress entities are in a separate package:

Repository: https://github.com/christhonie/wordpress-database
Package: za.co.idealogic.wordpress
Entity Count: 14

The WordPress database entities are maintained for legacy compatibility only. All WordPress-based user and person data will be migrated to the primary event-database entities over the next 6 months.

5. Entity Inheritance Hierarchies

Several entities use JPA inheritance strategies:

inheritance-hierarchies

5.1. Barcode Hierarchy

  • Barcode (base class)

    • RaceNumberBarcode

    • TagBarcode

    • RacePackBarcode

5.2. Attachment Hierarchy

  • Attachment (base class)

    • MembershipAttachment

5.3. WordPress Post Hierarchy (Legacy)

  • AbstractPost (base class, SINGLE_TABLE strategy)

    • WooCommerceProduct

    • WooCommerceOrder

5.4. WordPress User Hierarchy (Legacy)

  • User (base class, JOINED strategy)

    • UserWrapper

6. Multi-Tenancy Support

The system supports multi-tenant architecture through the Organisation entity:

  • Common entities - Shared across all tenants or tenant-specific based on configuration

  • Event entities - Scoped to organisations and their events

  • Membership entities - Organisation-specific memberships

  • Process entities - Can be global or organisation-specific

  • Financial entities - Organisation-scoped financial records

7. Technology Stack

All entities use:

  • Jakarta Persistence API (JPA) - Standard persistence framework

  • Hibernate - JPA implementation and provider

  • Spring Data JPA - Repository abstraction layer