# Generated by Django 1.9.8 on 2016-08-05 15:40

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name="FCMDevice",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        blank=True, max_length=255, null=True, verbose_name="Name"
                    ),
                ),
                (
                    "active",
                    models.BooleanField(
                        default=True,
                        help_text="Inactive devices will not be sent notifications",
                        verbose_name="Is active",
                    ),
                ),
                (
                    "date_created",
                    models.DateTimeField(
                        auto_now_add=True, null=True, verbose_name="Creation date"
                    ),
                ),
                (
                    "device_id",
                    models.UUIDField(
                        blank=True,
                        db_index=True,
                        help_text="GUID()",
                        null=True,
                        verbose_name="Device ID",
                    ),
                ),
                (
                    "registration_id",
                    models.TextField(verbose_name="Registration token"),
                ),
                (
                    "type",
                    models.CharField(
                        choices=[("ios", "ios"), ("android", "android")], max_length=10
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "verbose_name": "FCM device",
            },
        ),
    ]
