menu, table,rooms, orders structure
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
class MenuCategory < ApplicationRecord
|
||||
belongs_to :menu
|
||||
has_many :children, :class_name => "MenuCategory", foreign_key: "menu_category_id"
|
||||
belongs_to :parent, :class_name => "MenuCategory", foreign_key: "menu_category_id", optional: true
|
||||
|
||||
|
||||
validates_presence_of :name
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user