2024-08-06 14:16:40 +02:00
|
|
|
class Reservation < ApplicationRecord
|
|
|
|
|
belongs_to :company
|
|
|
|
|
belongs_to :customer
|
2024-08-24 07:06:09 +02:00
|
|
|
belongs_to :team
|
2024-08-06 14:16:40 +02:00
|
|
|
|
|
|
|
|
validates :company_id, presence: true
|
|
|
|
|
validates :customer_id, presence: true
|
2024-08-24 07:06:09 +02:00
|
|
|
validates :team_id, presence: true
|
2024-08-06 14:16:40 +02:00
|
|
|
end
|
2024-09-08 14:00:15 +02:00
|
|
|
|
|
|
|
|
class ReservationSerializer < ActiveModel::Serializer
|
|
|
|
|
attributes :id, :company, :customer, :team, :start_time, :end_time
|
2025-02-17 19:12:40 +01:00
|
|
|
end
|