# Generated by Django 2.2.4 on 2019-08-09 18:03

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('locale', models.CharField(default='en_US', max_length=255)),
                ('push_token', models.CharField(max_length=255, null=True)),
                ('platform', models.CharField(choices=[('ios', 'iOS'), ('android', 'Android')], max_length=255)),
                ('model', models.CharField(blank=True, max_length=255)),
                ('sns_platform_endpoint_arn', models.CharField(blank=True, max_length=255, null=True, unique=True, verbose_name='SNS Platform Endpoint')),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('date_created', models.DateTimeField(default=django.utils.timezone.now)),
                ('date_updated', models.DateTimeField(auto_now=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='devices', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Device',
                'verbose_name_plural': 'Devices',
                'ordering': ('-date_updated',),
                'get_latest_by': 'date_updated',
                'abstract': False,
                'unique_together': {('push_token', 'platform')},
            },
        ),
    ]
