# Generated by Django 3.2.16 on 2022-11-21 16:10

import apps.mobile_app.models
from django.db import migrations, models
import django.db.models.deletion
import django_migration_linter as linter


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('user_management', '0004_auto_20221025_0316'),
        ('auth_token', '0003_auto_20221121_1610'),
    ]

    operations = [
        linter.IgnoreMigration(),
        migrations.CreateModel(
            name='MobileAppVerificationToken',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token_key', models.CharField(db_index=True, max_length=8)),
                ('digest', models.CharField(max_length=128)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('revoked_at', models.DateTimeField(null=True)),
                ('expire_date', models.DateTimeField(default=apps.mobile_app.models.get_expire_date)),
                ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mobile_app_verification_token_set', to='user_management.organization')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mobile_app_verification_token_set', to='user_management.user')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.SeparateDatabaseAndState(
            state_operations=[
                migrations.CreateModel(
                    name='MobileAppAuthToken',
                    fields=[
                        ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                        ('token_key', models.CharField(db_index=True, max_length=8)),
                        ('digest', models.CharField(max_length=128)),
                        ('created_at', models.DateTimeField(auto_now_add=True)),
                        ('revoked_at', models.DateTimeField(null=True)),
                        ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mobile_app_auth_tokens', to='user_management.organization')),
                        ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mobile_app_auth_tokens', to='user_management.user')),
                    ],
                    options={
                        'abstract': False,
                    },
                ),
            ],
            database_operations=[],
        )
    ]
