# Generated by Django 3.2.15 on 2023-09-27 20:15

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('products', '0075_auto_20230927_2054'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='admininfo',
            name='token',
        ),
        migrations.RemoveField(
            model_name='admininfo',
            name='token_expire',
        ),
        migrations.RemoveField(
            model_name='tenant',
            name='token',
        ),
        migrations.RemoveField(
            model_name='tenant',
            name='token_expire',
        ),
        migrations.AlterField(
            model_name='admininfo',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='admininfo', to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='AuthToken',
            fields=[
                ('token', models.CharField(max_length=128, primary_key=True, serialize=False, verbose_name='API Token')),
                ('expire', models.DateTimeField(null=True)),
                ('admin', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tokens', to='products.admininfo')),
                ('tenant', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tokens', to='products.tenant')),
            ],
        ),
    ]
