98 lines
3.5 KiB
Python
98 lines
3.5 KiB
Python
# Generated by Django 5.0.2 on 2024-07-31 07:34
|
|
|
|
import django.db.models.deletion
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("manage_subscriptions", "0009_principalsubscription_coupon_code"),
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name="principalsubscription",
|
|
name="comments",
|
|
field=models.CharField(blank=True, max_length=255, null=True),
|
|
),
|
|
migrations.AddField(
|
|
model_name="principalsubscription",
|
|
name="is_stripe_subscription",
|
|
field=models.BooleanField(default=False),
|
|
),
|
|
migrations.AddField(
|
|
model_name="principalsubscription",
|
|
name="stripe_subscription_id",
|
|
field=models.CharField(blank=True, max_length=255, null=True),
|
|
),
|
|
migrations.AddField(
|
|
model_name="subscription",
|
|
name="price_id",
|
|
field=models.CharField(blank=True, max_length=255, null=True),
|
|
),
|
|
migrations.CreateModel(
|
|
name="StripeProduct",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("active", models.BooleanField(default=True)),
|
|
("deleted", models.BooleanField(default=False)),
|
|
("created_on", models.DateTimeField(auto_now_add=True)),
|
|
("modified_on", models.DateTimeField(auto_now=True)),
|
|
("title", models.CharField(max_length=255)),
|
|
("product_id", models.CharField(blank=True, max_length=255, null=True)),
|
|
("description", models.TextField(blank=True, null=True)),
|
|
("metadata", models.JSONField(blank=True, null=True)),
|
|
("image_url", models.URLField(blank=True, null=True)),
|
|
(
|
|
"default_price_id",
|
|
models.CharField(blank=True, max_length=255, null=True),
|
|
),
|
|
(
|
|
"created_by",
|
|
models.ForeignKey(
|
|
blank=True,
|
|
null=True,
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="%(class)s_created",
|
|
to=settings.AUTH_USER_MODEL,
|
|
),
|
|
),
|
|
(
|
|
"modified_by",
|
|
models.ForeignKey(
|
|
blank=True,
|
|
null=True,
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="%(class)s_modified",
|
|
to=settings.AUTH_USER_MODEL,
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"db_table": "stripe_product",
|
|
},
|
|
),
|
|
migrations.AddField(
|
|
model_name="subscription",
|
|
name="stripe_product",
|
|
field=models.ForeignKey(
|
|
blank=True,
|
|
null=True,
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="subscription_product",
|
|
to="manage_subscriptions.stripeproduct",
|
|
),
|
|
),
|
|
]
|