Files
sx-fc/app/models/cashier_terminal.rb
2017-10-27 12:02:38 +06:30

10 lines
263 B
Ruby
Executable File

class CashierTerminal < ApplicationRecord
has_many :cashier_terminal_by_zones
has_many :zones, through: :cashier_terminal_by_zones
scope :available, -> {where(is_currently_login: false)}
# validations
validates_presence_of :name, :printer_name
end