# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-12 20:36
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_timestamp', models.DateTimeField(auto_now_add=True, verbose_name='created timestamp')),
                ('modified_timestamp', models.DateTimeField(auto_now=True, verbose_name='modified timestamp')),
                ('code', models.CharField(max_length=32, verbose_name='activity code')),
                ('email_status', models.PositiveIntegerField(choices=[(1, 'Pending Status'), (2, 'In progress Status'), (3, 'Success Status'), (4, 'Failure Status')], default=1, verbose_name='email status')),
                ('push_status', models.PositiveIntegerField(choices=[(1, 'Pending Status'), (2, 'In progress Status'), (3, 'Success Status'), (4, 'Failure Status')], default=1, verbose_name='push status')),
                ('data', django_mysql.models.JSONField(default=dict)),
                ('actor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activities', to=settings.AUTH_USER_MODEL, verbose_name='actor')),
                ('notify_to', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notification_activities', to=settings.AUTH_USER_MODEL, verbose_name='notification reciever')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_timestamp', models.DateTimeField(auto_now_add=True, verbose_name='created timestamp')),
                ('modified_timestamp', models.DateTimeField(auto_now=True, verbose_name='modified timestamp')),
                ('code', models.CharField(max_length=32, verbose_name='activity code')),
                ('data', django_mysql.models.JSONField(default=dict)),
                ('is_read', models.BooleanField(default=False)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to=settings.AUTH_USER_MODEL, verbose_name='user')),
            ],
            options={
                'ordering': ('-created_timestamp',),
            },
        ),
    ]
