api for cashier app

This commit is contained in:
phyusin
2018-10-12 15:18:23 +06:30
parent 549a655bad
commit 11b4bdc804
11 changed files with 258 additions and 27 deletions

View File

@@ -3,6 +3,7 @@ class CashierTerminal < ApplicationRecord
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