Files
old-zsterminator/app/models/reservation.rb
2025-02-17 19:12:40 +01:00

14 lines
353 B
Ruby

class Reservation < ApplicationRecord
belongs_to :company
belongs_to :customer
belongs_to :team
validates :company_id, presence: true
validates :customer_id, presence: true
validates :team_id, presence: true
end
class ReservationSerializer < ActiveModel::Serializer
attributes :id, :company, :customer, :team, :start_time, :end_time
end