# Generated by Django 5.1.7 on 2025-04-01 09:47

import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="AddOnPackage",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100, verbose_name="name")),
                ("description", models.TextField(verbose_name="description")),
                (
                    "price",
                    models.DecimalField(
                        decimal_places=2, max_digits=10, verbose_name="price"
                    ),
                ),
            ],
            options={
                "verbose_name": "AddOnPackage",
                "verbose_name_plural": "AddOnPackage",
            },
        ),
        migrations.CreateModel(
            name="Subscription",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "start_date",
                    models.DateTimeField(
                        default=django.utils.timezone.now, verbose_name="start_date"
                    ),
                ),
                ("end_date", models.DateTimeField(verbose_name="end_date")),
                (
                    "last_billed",
                    models.DateTimeField(
                        blank=True, null=True, verbose_name="last_billed"
                    ),
                ),
            ],
            options={
                "verbose_name": "User Subscription",
                "verbose_name_plural": "User Subscription",
            },
        ),
        migrations.CreateModel(
            name="SubscriptionAddOn",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "quantity",
                    models.PositiveIntegerField(default=1, verbose_name="quantity"),
                ),
                (
                    "added_on",
                    models.DateTimeField(auto_now_add=True, verbose_name="added_on"),
                ),
            ],
            options={
                "verbose_name": "TenantSubscriptionAddOn",
                "verbose_name_plural": "TenantSubscriptionAddOn",
            },
        ),
        migrations.CreateModel(
            name="SubscriptionPlan",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100, verbose_name="name")),
                (
                    "price",
                    models.DecimalField(
                        decimal_places=2, max_digits=10, verbose_name="price"
                    ),
                ),
                (
                    "duration",
                    models.CharField(
                        choices=[
                            ("monthly", "Monthly"),
                            ("quarterly", "Quarterly"),
                            ("yearly", "Yearly"),
                        ],
                        max_length=10,
                        verbose_name="duration",
                    ),
                ),
            ],
            options={
                "verbose_name": "SubscriptionPlan",
                "verbose_name_plural": "SubscriptionPlan",
            },
        ),
        migrations.CreateModel(
            name="TenantBilling",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "total_price",
                    models.DecimalField(
                        decimal_places=2,
                        default=0,
                        max_digits=10,
                        verbose_name="total_price",
                    ),
                ),
                (
                    "billing_date",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="billing_date"
                    ),
                ),
            ],
            options={
                "verbose_name": "TenantBilling",
                "verbose_name_plural": "TenantBilling",
            },
        ),
    ]
