# Generated by Django 2.2.3 on 2019-07-14 12:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Advert',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('htmlad', models.CharField(help_text='Advertisement text, may contain html.', max_length=1024)),
            ],
        ),
        migrations.CreateModel(
            name='Face',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(default='', help_text='Image uploaded in base64 format. The core of this service.', max_length=256, upload_to='f/img/')),
                ('webp', models.ImageField(blank=True, default='', help_text='WEBP formatted thumbnail, max height: 100px', upload_to='f/thumb/')),
                ('jpg', models.ImageField(blank=True, default='', help_text='JPG formatted thumbnail, max height: 100px', upload_to='f/thumb/')),
                ('gif', models.ImageField(blank=True, default='', help_text='animated GIF thumbnail, max height: 100px', upload_to='f/thumb/')),
                ('png', models.ImageField(blank=True, default='', help_text='transparent PNG thumbnail, max height: 100px', upload_to='f/thumb/')),
                ('small', models.ImageField(blank=True, default='', help_text='Resize of image fitted into 320x320 box', upload_to='f/rsz/')),
                ('medium', models.ImageField(blank=True, default='', help_text='Resize of image fitted into 640x640 box', upload_to='f/rsz/')),
                ('large', models.ImageField(blank=True, default='', help_text='Resize of image fitted into 1000x1000 box', upload_to='f/rsz/')),
                ('huge', models.ImageField(blank=True, default='', help_text='Resize of image fitted into 1920x1920 box', upload_to='f/rsz/')),
                ('width', models.IntegerField(default=0, help_text='Width of image')),
                ('height', models.IntegerField(default=0, help_text='Height of image')),
                ('source', models.URLField(blank=True, default='', help_text='Source for image')),
                ('md5', models.CharField(default='', help_text='md5 hash of image for detecting duplicates.', max_length=32)),
                ('removed', models.BooleanField(default=False, help_text="Image is 'removed' and should not be shown")),
                ('comment', models.CharField(blank=True, default='', help_text='Reason for deletion etc.', max_length=512)),
                ('added', models.DateTimeField(help_text='Date added', verbose_name='date added')),
                ('accepted', models.BooleanField(default=False, help_text='Face has been accepted by moderator.')),
                ('processed', models.BooleanField(default=False, help_text='Thumbnails and resizes have been generated and compressed')),
                ('views', models.IntegerField(default=0, help_text='Views during last 7 days.')),
                ('hotness', models.FloatField(default=0, help_text='Represents newness and popularity of face.')),
                ('duplicate_of', models.ForeignKey(blank=True, default=None, help_text='Current image is duplicate, redirect to duplicate_of Face', null=True, on_delete=django.db.models.deletion.CASCADE, to='viewer.Face')),
            ],
        ),
        migrations.CreateModel(
            name='Feedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contact', models.CharField(default='', help_text='Contact info of feedback giver', max_length=256)),
                ('image', models.ImageField(help_text='DEPRECATED', max_length=256, upload_to='upload/')),
                ('text', models.TextField(help_text='The feedback goes here. What is on your mind?')),
                ('datetime', models.DateTimeField(auto_now_add=True, help_text='When the feedback was received.', verbose_name='datetime when added')),
                ('useragent', models.CharField(default='', help_text='Useragent of feedback giver. Useful for bug reports.', max_length=512)),
                ('processed', models.BooleanField(default=False, help_text='DEPRECATED')),
            ],
        ),
        migrations.CreateModel(
            name='UserComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(default='Poninymous', help_text='Username of anon user', max_length=16)),
                ('text', models.CharField(default='', help_text='Comment itself', max_length=255)),
                ('client', models.GenericIPAddressField(help_text='IP of the commenter')),
                ('visible', models.CharField(choices=[('moderated', 'Moderated'), ('hidden', 'Hidden'), ('visible', 'Visible')], default='visible', help_text='If comment is visible, moderated or hidden', max_length=16)),
                ('color', models.CharField(help_text='IP/Face specific color', max_length=6)),
                ('time', models.DateTimeField(auto_now_add=True, help_text='Time of writing')),
                ('face', models.ForeignKey(help_text='Face that is being commented', on_delete=django.db.models.deletion.CASCADE, to='viewer.Face')),
            ],
        ),
        migrations.CreateModel(
            name='Flag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_agent', models.CharField(help_text='User agent of reporter.', max_length=512, null=True)),
                ('reason', models.TextField(help_text='Reason for report.')),
                ('face', models.ForeignKey(help_text='Face related to this report.', on_delete=django.db.models.deletion.CASCADE, to='viewer.Face')),
            ],
        ),
        migrations.CreateModel(
            name='ChangeLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('datetime', models.DateTimeField(auto_now=True, help_text='Datetime of change', verbose_name='datetime when added')),
                ('source', models.URLField(blank=True, default='', help_text='New source for face')),
                ('face', models.ForeignKey(help_text='Face related to change', null=True, on_delete=django.db.models.deletion.SET_NULL, to='viewer.Face')),
                ('flag', models.ForeignKey(help_text='Face was flagged', null=True, on_delete=django.db.models.deletion.SET_NULL, to='viewer.Flag')),
            ],
        ),
    ]
