|
@@ -1,7 +1,7 @@
|
|
|
class Promotion < ActiveRecord::Base
|
|
class Promotion < ActiveRecord::Base
|
|
|
has_paper_trail
|
|
has_paper_trail
|
|
|
self.table_name = "promotions"
|
|
self.table_name = "promotions"
|
|
|
- validates :begin_time,:end_time,:name,:order_type, presence: true
|
|
|
|
|
|
|
+ validates :begin_time,:end_time,:name,:order_type,:depart_record, presence: true
|
|
|
has_and_belongs_to_many :depart_record
|
|
has_and_belongs_to_many :depart_record
|
|
|
|
|
|
|
|
def prodcut1
|
|
def prodcut1
|