mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
renamed RepaymentSchedule to PaymentSchedule
This commit is contained in:
parent
0912374719
commit
840be2c6c0
@ -1,8 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# RepaymentSchedule is a way for members to pay something (especially a Subscription) with multiple payment,
|
||||
# PaymentSchedule is a way for members to pay something (especially a Subscription) with multiple payment,
|
||||
# staged on a long period rather than with a single payment
|
||||
class RepaymentSchedule < ApplicationRecord
|
||||
class PaymentSchedule < ApplicationRecord
|
||||
belongs_to :scheduled, polymorphic: true
|
||||
belongs_to :wallet_transaction
|
||||
belongs_to :coupon
|
6
app/models/payment_schedule_item.rb
Normal file
6
app/models/payment_schedule_item.rb
Normal file
@ -0,0 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Represents a due date and the associated amount for a PaymentSchedule
|
||||
class PaymentScheduleItem < ApplicationRecord
|
||||
belongs_to :payment_schedule
|
||||
end
|
@ -1,6 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Represents a due date and the associated amount for a RepaymentSchedule
|
||||
class RepaymentScheduleItem < ApplicationRecord
|
||||
belongs_to :repayment_schedule
|
||||
end
|
@ -1,10 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Saves RepaymentSchedules in database.
|
||||
# Saves PaymentSchedules in database.
|
||||
# It allows to pay with multiple payments
|
||||
class CreateRepaymentSchedules < ActiveRecord::Migration[5.2]
|
||||
class CreatePaymentSchedules < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :repayment_schedules do |t|
|
||||
create_table :payment_schedules do |t|
|
||||
t.references :scheduled, polymorphic: true
|
||||
t.integer :total
|
||||
t.string :stp_subscription_id
|
14
db/migrate/20201027101809_create_payment_schedule_items.rb
Normal file
14
db/migrate/20201027101809_create_payment_schedule_items.rb
Normal file
@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Save each due dates for PaymentSchedules
|
||||
class CreatePaymentScheduleItems < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :payment_schedule_items do |t|
|
||||
t.integer :amount
|
||||
t.datetime :due_date
|
||||
t.belongs_to :payment_schedule, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -1,14 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Save each due dates for RepaymentSchedules
|
||||
class CreateRepaymentScheduleItems < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :repayment_schedule_items do |t|
|
||||
t.integer :amount
|
||||
t.datetime :due_date
|
||||
t.belongs_to :repayment_schedule, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user