fixed conflict

This commit is contained in:
Nweni
2017-06-06 09:43:16 +06:30
50 changed files with 331 additions and 106 deletions

View File

@@ -1,9 +1,17 @@
class Booking < ApplicationRecord
self.primary_key = "booking_id"
#primary key - need to be unique
before_create :generate_custom_id
belongs_to :dining_facility, :optional => true
belongs_to :sale, :optional => true
has_many :booking_orders
has_many :orders, :through => :booking_orders
private
def generate_custom_id
self.booking_id = SeedGenerator.generate_id(self.class.name, "BKI")
end
end