class Zone < ApplicationRecord
  # model association
 has_many :tables, dependent: :destroy
 has_many :rooms, dependent: :destroy
 has_many :order_queue_stations

 # validations
 validates_presence_of :name, :created_by

 def self.collection
   Zone.select("id, name").map { |e| [e.name, e.id] }
 end
end
