feat(promotion code): Promotion code system done

I added the features for users to use promotion code
and for promoters to create on their events.
May be rewrite to discount code?
This commit is contained in:
kbe
2025-09-29 15:25:52 +02:00
parent 72d54e02ab
commit 87ccebf229
19 changed files with 391 additions and 302 deletions

View File

@@ -21,6 +21,7 @@ class Event < ApplicationRecord
has_many :ticket_types
has_many :tickets, through: :ticket_types
has_many :orders
has_many :promotion_codes
# === Callbacks ===
before_validation :geocode_address, if: :should_geocode_address?