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

12
app/models/order.rb Normal file
View File

@@ -0,0 +1,12 @@
class Order < ApplicationRecord
before_create :set_order_date
belongs_to :customer
has_many :order_items, inverse_of: :order
has_many :dining_ins
private
def set_order_date
self.date = Time.now.utc
end
end