Skip to main content

Database Models & Relationships Documentation

Table of Contents

  1. Overview
  2. Core Models
  3. Event Management Models
  4. User Management Models
  5. Payment & Order Models
  6. Ranking Models
  7. Merchandise Models
  8. Communication Models
  9. Configuration Models
  10. Model Relationships
  11. Model Scopes & Accessors
  12. Database Migrations

Overview

The event management system uses Laravel’s Eloquent ORM with a well-structured database design. The models are organized into logical groups and include proper relationships, scopes, and accessors for efficient data handling.

Core Models

Evento (Event)

The central model representing events in the system.

Relationships

Accessors & Mutators

User

The user model representing system users.

Relationships

Organizador (Organizer)

Represents event organizers.

Relationships

Event Management Models

EventoXUsuario (Event Registration)

Represents user registrations for events.

Relationships

CategoriaDeEvento (Event Category)

Represents event categories.

Relationships

TarifaDeEvento (Event Tariff)

Represents pricing tiers for events.

Relationships

User Management Models

Role & Permission Models

Payment & Order Models

Order

Represents payment orders.

Relationships

OrderItem

Represents individual items in an order.

Relationships

Refund

Represents payment refunds.

Ranking Models

EventRanking

Represents rankings for specific events.

Relationships

GeneralRanking

Represents general rankings across multiple events.

Ranking

Base ranking model.

Relationships

Merchandise Models

Catalogo (Catalog)

Represents merchandise catalogs.

Relationships

Producto (Product)

Represents merchandise products.

Relationships

Variant

Represents product variants (size, color, etc.).

Relationships

VariantName

Represents attribute names for variants.

Communication Models

Communication

Represents communication templates.

Relationships

CommunicationLog

Represents communication delivery logs.

Relationships

Configuration Models

Discount

Represents discount codes and promotions.

Relationships

Idioma (Language)

Represents supported languages.

Tarifa (Tariff)

Represents base tariff templates.

Booking

Represents event bookings and reservations.

Relationships

Cities & Countries

Geographic data models.

Model Relationships

Complete Relationship Diagram

Model Scopes & Accessors

Common Scopes

Custom Accessors

Database Migrations

Key Migration Examples

Indexes and Constraints

This comprehensive model documentation provides a complete overview of all database models, their relationships, attributes, and usage patterns in the event management system. The documentation includes practical examples and best practices for working with the models.