website/hub/services/migrations/0037_remove_plan_pricing_planprice.py

64 lines
1.9 KiB
Python
Raw Normal View History

2025-06-23 10:00:19 +02:00
# Generated by Django 5.2 on 2025-06-23 07:58
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("services", "0036_alter_vshnappcataddonbasefee_options_and_more"),
]
operations = [
migrations.RemoveField(
model_name="plan",
name="pricing",
),
migrations.CreateModel(
name="PlanPrice",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"currency",
models.CharField(
choices=[
("CHF", "Swiss Franc"),
("EUR", "Euro"),
("USD", "US Dollar"),
],
max_length=3,
),
),
(
"amount",
models.DecimalField(
decimal_places=2,
help_text="Price in the specified currency, excl. VAT",
max_digits=10,
),
),
(
"plan",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="plan_prices",
to="services.plan",
),
),
],
options={
"ordering": ["currency"],
"unique_together": {("plan", "currency")},
},
),
]