2025-05-13 11:58:17 +08:00
|
|
|
# Generated by Django 5.2 on 2025-05-12 06:56
|
2025-05-07 18:01:48 +08:00
|
|
|
|
|
|
|
import django.db.models.deletion
|
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='GmailCredential',
|
|
|
|
fields=[
|
2025-05-13 11:58:17 +08:00
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('email', models.EmailField(help_text='Gmail email address', max_length=254, unique=True)),
|
|
|
|
('credentials', models.TextField(help_text='Serialized OAuth2 credentials (JSON)')),
|
|
|
|
('is_default', models.BooleanField(default=False, help_text='Default Gmail account for user')),
|
|
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
|
|
('is_valid', models.BooleanField(default=True, help_text='Whether the credential is valid')),
|
2025-05-07 18:01:48 +08:00
|
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='gmail_credentials', to=settings.AUTH_USER_MODEL)),
|
|
|
|
],
|
|
|
|
options={
|
2025-05-13 11:58:17 +08:00
|
|
|
'unique_together': {('user', 'email')},
|
2025-05-07 18:01:48 +08:00
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|