add cashier zone in ui

This commit is contained in:
Yan
2017-10-23 10:53:22 +06:30
parent 649f50bd5e
commit 95ef534b04
7 changed files with 10 additions and 8 deletions

View File

@@ -1,2 +1,4 @@
class CashierTerminal < ApplicationRecord
has_many :cashier_terminal_by_zones
has_many :zones, through: :cashier_terminal_by_zones
end

View File

@@ -1,2 +1,4 @@
class CashierTerminalByZone < ApplicationRecord
belongs_to :zone
belongs_to :cashier_terminal
end

View File

@@ -3,6 +3,7 @@ class Zone < ApplicationRecord
has_many :tables, dependent: :destroy
has_many :rooms, dependent: :destroy
has_many :order_queue_stations
has_many :cashier_terminals
# validations
validates_presence_of :name, :created_by