<reponame>Rom4eg/myCompany
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-22 19:53
from __future__ import unicode_literals

import dashboard.mixins.dashboard_mixin
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='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField(verbose_name='Comment')),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='comments', to=settings.AUTH_USER_MODEL, verbose_name='Author')),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Title')),
                ('content', models.TextField(verbose_name='Rule content')),
                ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='Create date')),
                ('start_date', models.DateTimeField(auto_now_add=True, verbose_name='Create date')),
                ('end_date', models.DateTimeField(auto_now_add=True, verbose_name='Create date')),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_events', to=settings.AUTH_USER_MODEL, verbose_name='Author')),
                ('subscribers', models.ManyToManyField(blank=True, related_name='subscribed_to', to=settings.AUTH_USER_MODEL, verbose_name='Subscribers')),
            ],
            bases=(models.Model, dashboard.mixins.dashboard_mixin.DashboardMixin),
        ),
        migrations.AddField(
            model_name='comment',
            name='event',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='events.Event', verbose_name='Event'),
        ),
    ]
