feat: Add promotion code functionality to ticket orders
This commit is contained in:
@@ -7,6 +7,8 @@ class Order < ApplicationRecord
|
||||
belongs_to :user
|
||||
belongs_to :event
|
||||
has_many :tickets, dependent: :destroy
|
||||
has_many :order_promotion_codes, dependent: :destroy
|
||||
has_many :promotion_codes, through: :order_promotion_codes
|
||||
|
||||
# === Validations ===
|
||||
validates :user_id, presence: true
|
||||
|
||||
Reference in New Issue
Block a user