2020-10-27 11:32:20 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-10-27 16:02:41 +01:00
|
|
|
# PaymentSchedule is a way for members to pay something (especially a Subscription) with multiple payment,
|
2020-10-27 11:32:20 +01:00
|
|
|
# staged on a long period rather than with a single payment
|
2020-10-27 16:02:41 +01:00
|
|
|
class PaymentSchedule < ApplicationRecord
|
2020-10-27 11:32:20 +01:00
|
|
|
belongs_to :scheduled, polymorphic: true
|
|
|
|
belongs_to :wallet_transaction
|
|
|
|
belongs_to :coupon
|
|
|
|
belongs_to :invoicing_profile
|
|
|
|
belongs_to :operator_profile, foreign_key: :operator_profile_id, class_name: 'InvoicingProfile'
|
|
|
|
end
|