Skip to content

Comments

feat: add event types to events model, validator, and migration#388

Open
loudsheep wants to merge 6 commits intomainfrom
feat/event-types
Open

feat: add event types to events model, validator, and migration#388
loudsheep wants to merge 6 commits intomainfrom
feat/event-types

Conversation

@loudsheep
Copy link
Member

@loudsheep loudsheep commented Feb 9, 2026

Important

Add categories field to events with model, validation, and migration updates.

  • Database:
    • Adds categories column to events table in 1770630511827_create_add_type_to_events_table.ts.
  • Models:
    • Adds categories field to Event model in event.ts with JSON serialization/deserialization.
  • Validation:
    • Updates createEventValidator and updateEventValidator in validators/event.ts to include categories as an optional array of ALLOWED_EVENT_CATEGORIES.
  • Controllers:
    • Modifies store() and update() in events_controller.ts to handle categories field, defaulting to an empty array if null.

This description was created by Ellipsis for c116e03. You can customize this summary. It will automatically update as commits are pushed.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for categorizing events by introducing an array of allowed “event types” that can be stored on events, validated on input, and returned in the public events listing.

Changes:

  • Add types JSON column to the events table via a migration.
  • Add EventTypes / EventType definitions and ALLOWED_EVENT_TYPES list for validation.
  • Extend event create/update validators and public events selection to include types.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
database/migrations/1770630511827_create_add_type_to_events_table.ts Adds nullable types JSON column to events table.
app/validators/event.ts Validates types as an optional/nullable array of allowed event types for create/update.
app/types/event_types.ts Defines allowed event-type values and exports a list for validation.
app/models/event.ts Adds types column to the Event model.
app/controllers/events_controller.ts Includes types in the publicIndex select list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant