# Generated by Django 4.2.2 on 2024-08-27 14:16

from django.db import migrations, models
import django.utils.timezone
import seahub.base.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Token',
            fields=[
                ('key', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('user', seahub.base.fields.LowerCaseCharField(max_length=255, unique=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='TokenV2',
            fields=[
                ('key', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('user', seahub.base.fields.LowerCaseCharField(max_length=255)),
                ('platform', seahub.base.fields.LowerCaseCharField(max_length=32)),
                ('device_id', models.CharField(max_length=40)),
                ('device_name', models.CharField(max_length=40)),
                ('platform_version', seahub.base.fields.LowerCaseCharField(max_length=16)),
                ('client_version', seahub.base.fields.LowerCaseCharField(max_length=16)),
                ('last_accessed', models.DateTimeField(auto_now=True)),
                ('last_login_ip', models.GenericIPAddressField(default=None, null=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('wiped_at', models.DateTimeField(null=True)),
            ],
            options={
                'unique_together': {('user', 'platform', 'device_id')},
            },
        ),
    ]
