update oqs employee and oqs station

This commit is contained in:
Aung Myo
2018-08-14 17:21:06 +06:30
parent f6ec819545
commit ba8c723c17
8 changed files with 57 additions and 11 deletions

View File

@@ -2,6 +2,7 @@ class Employee < ApplicationRecord
has_secure_password
has_many :commissioners
has_many :shit_sales
belongs_to :order_queue_station
validates_presence_of :name, :role
validates_presence_of :password, :on => [:create]

View File

@@ -7,6 +7,7 @@ class OrderQueueStation < ApplicationRecord
has_many :order_items
has_many :order_queue_process_by_zones
has_many :zones, through: :order_queue_process_by_zones
belongs_to :employee
scope :active, -> {where(is_active: true)}