@@ -1,7 +1,8 @@
class BalancePromotion < ActiveRecord::Base
has_paper_trail
self.table_name = "balance_promotions"
- has_and_belongs_to_many :depart_record
+ has_and_belongs_to_many :depart_record, :join_table => :depart_records_balance_promotions
+
validates :begin_time,:end_time,:name,:min_total,:max_total, presence: true
validate :product_validation