# Generated by Django 4.2.10 on 2024-03-19 10:27

import apps.auth_token.models.google_oauth2_token
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('user_management', '0020_organization_is_grafana_labels_enabled'),
        ('auth_token', '0005_integrationauthtoken'),
    ]

    operations = [
        migrations.CreateModel(
            name='GoogleOAuth2Token',
            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.auth_token.models.google_oauth2_token.get_expire_date)),
                ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='google_oauth2_auth_token_set', to='user_management.organization')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='google_oauth2_auth_token_set', to='user_management.user')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
