# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-10-25 14:45
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),
        ('categories', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Badge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('icon', models.URLField(blank=True, null=True)),
                ('description', models.CharField(max_length=140)),
                ('sharing_text', models.CharField(blank=True, max_length=140, null=True)),
                ('is_active', models.BooleanField(default=True)),
            ],
            options={
                'ordering': ['name'],
                'verbose_name_plural': 'badges',
            },
        ),
        migrations.CreateModel(
            name='EmployeeBadge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now=True)),
                ('assigned_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='employeebadge_assigned_by', to=settings.AUTH_USER_MODEL)),
                ('badge', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='stars.Badge')),
                ('to_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='employeebadge_to', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['date', 'to_user'],
            },
        ),
        migrations.CreateModel(
            name='Star',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now=True)),
                ('text', models.CharField(blank=True, max_length=140, null=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='categories.Category')),
                ('from_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='star_from', to=settings.AUTH_USER_MODEL)),
                ('keyword', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='categories.Keyword')),
                ('to_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='star_to', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['date', 'to_user'],
            },
        ),
        migrations.AlterUniqueTogether(
            name='employeebadge',
            unique_together=set([('to_user', 'badge')]),
        ),
    ]
