1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/models/ticket.rb

13 lines
488 B
Ruby
Raw Normal View History

2020-03-30 11:33:12 +02:00
# frozen_string_literal: true
# Ticket is an reservation of a member for an Event, with a specific PriceCategory
# For example, Member John Smith smith has book 2 places on Event "Arduino initiation" at price "reduces fare"
2020-03-25 10:16:47 +01:00
class Ticket < ApplicationRecord
belongs_to :reservation
belongs_to :event_price_category
validates :event_price_category_id, presence: true
validates :booked, presence: true
validates :booked, numericality: { only_integer: true, greater_than: 0 }
end