Last active
November 6, 2017 16:57
-
-
Save moeamaya/4d4dbdf15bd884c2c103a0efd71066ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Organization < ApplicationRecord | |
has_one :subscription | |
end | |
class Subscription < ApplicationRecord | |
has_many :payments | |
# stripe_id | |
# plan_id | |
# last_four | |
# card_type | |
# organization_id | |
# exp_month | |
# exp_year | |
# coupon_id | |
# coupon_name | |
end | |
class Payment < ApplicationRecord | |
belongs_to :subscription | |
# amount | |
# seats | |
# date | |
# times_tried | |
# is_paid | |
end | |
############################ | |
# Future for multiple cards | |
############################ | |
class CreditCard < ApplicationRecord | |
belongs_to :subscription | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment