website/hub/services/migrations/0037_remove_plan_pricing_planprice.py
Tobias Brunner 61cabd1b1e
Some checks failed
Django Tests / test (push) Failing after 1m3s
Django Tests / test (pull_request) Failing after 1m3s
implement plan pricing
2025-06-20 17:40:38 +02:00

63 lines
1.9 KiB
Python

# Generated by Django 5.2 on 2025-06-20 15:28
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")},
},
),
]