menu, table,rooms, orders structure

This commit is contained in:
Min Zeya Phyo
2017-04-03 21:26:22 +06:30
parent 40423c12d3
commit 30b4a0f5ff
60 changed files with 536 additions and 101 deletions

10
app/models/order_item.rb Normal file
View File

@@ -0,0 +1,10 @@
class OrderItem < ApplicationRecord
#Associations
belongs_to :order
#Validation
validates_presence_of :item_code, :item_name, :qty
validates :qty, numericality: { :greater_than 0 }
validates_associated :orders
end