# Generated by Django 3.1.7 on 2021-04-14 09:38

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Data',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(blank=True, max_length=100, verbose_name='科目種別')),
                ('no', models.CharField(blank=True, max_length=10, verbose_name='授業番号')),
                ('semester', models.CharField(blank=True, max_length=5, verbose_name='学期')),
                ('day', models.CharField(blank=True, max_length=1, verbose_name='曜日')),
                ('name', models.CharField(blank=True, max_length=20, verbose_name='科目')),
                ('period', models.CharField(blank=True, max_length=2, verbose_name='時限')),
                ('teacher', models.CharField(blank=True, max_length=30, verbose_name='担当教員')),
                ('credit', models.CharField(blank=True, max_length=1, verbose_name='単位')),
            ],
            options={
                'verbose_name': '授業',
                'verbose_name_plural': '授業一覧',
            },
        ),
        migrations.CreateModel(
            name='Topic',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('no', models.IntegerField(default=0)),
                ('title', models.CharField(max_length=30, null=True, verbose_name='タイトル')),
                ('content', models.TextField(null=True, verbose_name='本文')),
                ('time', models.DateTimeField(default=django.utils.timezone.now)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('pub_flg', models.BooleanField(default=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('data', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='cissapp.data')),
            ],
            options={
                'verbose_name': '投稿',
                'verbose_name_plural': '投稿一覧',
            },
        ),
        migrations.CreateModel(
            name='Vote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip_address', models.CharField(max_length=50, verbose_name='IPアドレス')),
                ('topic', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cissapp.topic')),
            ],
        ),
    ]
