<reponame>AppointmentGuru/GuruComunication
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-03-20 17:35
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('backend_used', models.CharField(max_length=100)),
                ('backend_message_id', models.CharField(max_length=100)),
                ('payload_sent', models.TextField()),
                ('payload_received', models.TextField()),
                ('is_successful', models.BooleanField()),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='MessageTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_default_template', models.BooleanField(default=False, help_text='Set to true if this is the base e-mail template you want to use if the user has not specified a custom one')),
                ('template_id', models.SlugField(help_text='This will be used to uniquely identify this type of message')),
                ('email_base_template', models.CharField(blank=True, max_length=100, null=True)),
                ('name', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, null=True)),
                ('preferred_delivery_method', models.CharField(choices=[('EMAIL', 'Email'), ('SMS', 'SMS'), ('NOTIFICATION', 'In-app notification')], default='EMAIL', max_length=10)),
                ('subject', models.CharField(blank=True, max_length=200, null=True)),
                ('long_message', models.TextField(help_text='The message to use when space is not limited. e.g.: E-mail')),
                ('short_message', models.TextField(help_text='The message to use when space is limited. e.g.: SMS', max_length=144)),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='message',
            name='template',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gurucommunication.MessageTemplate'),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-03-20 17:35
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('backend_used', models.CharField(max_length=100)),
                ('backend_message_id', models.CharField(max_length=100)),
                ('payload_sent', models.TextField()),
                ('payload_received', models.TextField()),
                ('is_successful', models.BooleanField()),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='MessageTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_default_template', models.BooleanField(default=False, help_text='Set to true if this is the base e-mail template you want to use if the user has not specified a custom one')),
                ('template_id', models.SlugField(help_text='This will be used to uniquely identify this type of message')),
                ('email_base_template', models.CharField(blank=True, max_length=100, null=True)),
                ('name', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, null=True)),
                ('preferred_delivery_method', models.CharField(choices=[('EMAIL', 'Email'), ('SMS', 'SMS'), ('NOTIFICATION', 'In-app notification')], default='EMAIL', max_length=10)),
                ('subject', models.CharField(blank=True, max_length=200, null=True)),
                ('long_message', models.TextField(help_text='The message to use when space is not limited. e.g.: E-mail')),
                ('short_message', models.TextField(help_text='The message to use when space is limited. e.g.: SMS', max_length=144)),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='message',
            name='template',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gurucommunication.MessageTemplate'),
        ),
    ]
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-03-20 17:35