# Generated by Django 3.2.7 on 2021-09-17 13:10

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='untitled', max_length=200, verbose_name='title')),
                ('content', models.TextField(blank=True, verbose_name='content')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='created time')),
            ],
            options={
                'verbose_name': 'article',
                'verbose_name_plural': 'articles',
                'db_table': 'article',
            },
        ),
        migrations.CreateModel(
            name='ArticleComment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField(max_length=400, verbose_name='content')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='created time')),
            ],
            options={
                'verbose_name': 'article comment',
                'verbose_name_plural': 'article comments',
                'db_table': 'article_comment',
            },
        ),
        migrations.CreateModel(
            name='ArticleImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=200, verbose_name='name')),
                ('image', models.ImageField(blank=True, null=True, upload_to='articles/images', verbose_name='image')),
            ],
            options={
                'verbose_name': 'article image',
                'verbose_name_plural': 'article images',
                'db_table': 'article_image',
            },
        ),
        migrations.CreateModel(
            name='ArticleTag',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, null=True, unique=True, verbose_name='name')),
            ],
            options={
                'verbose_name': 'article tag',
                'verbose_name_plural': 'article tags',
                'db_table': 'article_tag',
            },
        ),
        migrations.CreateModel(
            name='ArticleVote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.IntegerField(default=0, verbose_name='value')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='created time')),
                ('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='articles.article', verbose_name='article')),
            ],
            options={
                'verbose_name': 'article vote',
                'verbose_name_plural': 'article votes',
                'db_table': 'article_vote',
            },
        ),
    ]
