# Generated by Django 3.2.8 on 2022-12-29 18:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='SocialProvider',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, default=None, max_length=255, null=True, verbose_name='Name')),
                ('logo', models.FileField(upload_to='', verbose_name='Logo')),
                ('default_provider', models.BooleanField(default=False, verbose_name='Default Provider')),
                ('provider', models.CharField(choices=[('facebook', 'Facebook'), ('google', 'Goggle'), ('twitter', 'Twitter')], default='facebook', max_length=255, verbose_name='Provider')),
                ('client_id', models.CharField(max_length=500, verbose_name='Client Id')),
                ('client_secret', models.TextField(blank=True, default=None, null=True, verbose_name='Client Secret')),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.TextField(verbose_name='Token')),
                ('expires_at', models.DateTimeField(verbose_name='Expires At')),
                ('provider_user_id', models.BigIntegerField(verbose_name='Provider User ID')),
                ('is_active', models.BooleanField(default=False)),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dj_accounts.socialprovider', verbose_name='Provider')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='social_accounts', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
        ),
    ]
