Phasing out Product model
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
parent
1aead50170
commit
c6bacab35a
12 changed files with 227 additions and 26 deletions
|
|
@ -876,7 +876,7 @@ class Product(UncloudModel):
|
|||
choices=UncloudStatus.choices,
|
||||
default=UncloudStatus.AWAITING_PAYMENT)
|
||||
|
||||
# config = models.JSONField()
|
||||
config = models.JSONField()
|
||||
|
||||
# Default period for all products
|
||||
default_recurring_period = RecurringPeriod.PER_30D
|
||||
|
|
@ -996,8 +996,8 @@ class Product(UncloudModel):
|
|||
def allowed_recurring_periods():
|
||||
return RecurringPeriod.choices
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
# class Meta:
|
||||
# abstract = True
|
||||
|
||||
def discounted_price_by_period(self, requested_period):
|
||||
"""
|
||||
|
|
@ -1082,7 +1082,7 @@ class Product(UncloudModel):
|
|||
|
||||
|
||||
# Sample products included into uncloud
|
||||
class SampleOneTimeProduct(Product):
|
||||
class SampleOneTimeProduct(models.Model):
|
||||
"""
|
||||
Products are usually more complex, but this product shows how easy
|
||||
it can be to create your own one time product.
|
||||
|
|
@ -1096,7 +1096,7 @@ class SampleOneTimeProduct(Product):
|
|||
def one_time_price(self):
|
||||
return self.ot_price
|
||||
|
||||
class SampleRecurringProduct(Product):
|
||||
class SampleRecurringProduct(models.Model):
|
||||
"""
|
||||
Products are usually more complex, but this product shows how easy
|
||||
it can be to create your own recurring fee product.
|
||||
|
|
@ -1110,7 +1110,7 @@ class SampleRecurringProduct(Product):
|
|||
def recurring_price(self):
|
||||
return self.rc_price
|
||||
|
||||
class SampleRecurringProductOneTimeFee(Product):
|
||||
class SampleRecurringProductOneTimeFee(models.Model):
|
||||
"""
|
||||
Products are usually more complex, but this product shows how easy
|
||||
it can be to create your own one time + recurring fee product.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue