Add ManualSubscription model

This commit is contained in:
Son NK 2020-02-23 16:31:14 +07:00
parent e51f91e769
commit b2eb084720
1 changed files with 16 additions and 0 deletions

View File

@ -736,6 +736,22 @@ class Subscription(db.Model, ModelMixin):
return "Yearly ($29.99/year)"
class ManualSubscription(db.Model, ModelMixin):
"""
For users who use other forms of payment and therefore not pass by Paddle
"""
user_id = db.Column(
db.ForeignKey(User.id, ondelete="cascade"), nullable=False, unique=True
)
# an reminder is sent several days before the subscription ends
end_at = db.Column(ArrowType, nullable=False)
# for storing note about this subscription
comment = db.Column(db.Text, nullable=True)
class DeletedAlias(db.Model, ModelMixin):
"""Store all deleted alias to make sure they are NOT reused"""