Files
sx-fc/app/models/cashier_terminal.rb
2018-10-12 15:18:23 +06:30

11 lines
312 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)}
scope :is_active, -> {where(is_active: true)}
# validations
validates_presence_of :name, :printer_name
end