# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
from django.conf import settings
import django_extensions.db.fields


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('contenttypes', '0002_remove_content_type_name'),
        ('sync', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(serialize=False, blank=True, editable=False, primary_key=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('weight', models.SmallIntegerField(verbose_name='weight', default=1, help_text='The weight of this like.')),
                ('date_time', models.DateTimeField(verbose_name='date time', auto_now=True, help_text='The date/time when author has liked this object.')),
                ('object_uuid', models.UUIDField(verbose_name='object uuid', help_text='The liked object uuid.')),
                ('author', models.ForeignKey(verbose_name='auteur', related_name='likes', to=settings.AUTH_USER_MODEL, help_text='The user who liked this object.')),
                ('content_type', models.ForeignKey(verbose_name='type de contenu', to='contenttypes.ContentType', help_text='The type of liked object.')),
                ('first_update', models.ForeignKey(null=True, blank=True, related_name='like_by_first', to='sync.Update')),
                ('last_update', models.ForeignKey(null=True, blank=True, related_name='like_by_last', to='sync.Update')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='like',
            unique_together=set([('author', 'content_type', 'object_uuid')]),
        ),
    ]
