# Generated by Django 2.2.2 on 2019-06-04 21:16

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),
    ]

    operations = [
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pmo', models.CharField(choices=[('unknown', 'unknown'), ('pmo2015', 'pmo2015'), ('pmo2016', 'pmo2016'), ('pmo2017', 'pmo2017'), ('pmo2018', 'pmo2018'), ('pmo2019', 'pmo2019')], default='unknown', help_text='漫展', max_length=10)),
                ('validated', models.BooleanField(default=False)),
                ('name', models.CharField(default='未命名', max_length=50)),
                ('item_type', models.CharField(default='', help_text='种类', max_length=20)),
                ('content', models.CharField(default='', help_text='内容', max_length=100)),
                ('price', models.FloatField(default=0, help_text='价格')),
                ('url', models.URLField(default='', help_text='链接')),
                ('authors', models.TextField(default='', help_text='作者名单')),
                ('introduction', models.TextField(default='', help_text='简介')),
                ('cover_image', models.ImageField(help_text='封面图片', max_length=1024, null=True, upload_to='items/%Y/%m/%d')),
                ('forto', models.CharField(default='', help_text='面向人群', max_length=20)),
                ('is_restricted', models.CharField(default='', help_text='限制级是否', max_length=20)),
                ('circle', models.CharField(default='', help_text='出品社团', max_length=40)),
                ('is_started_with', models.BooleanField(default=False, help_text='是否首发')),
                ('item_order', models.IntegerField(default=0, help_text='商品排序')),
            ],
            options={
                'ordering': ['seller'],
            },
        ),
        migrations.CreateModel(
            name='Option',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(max_length=255, unique=True)),
                ('value', models.TextField(default='')),
            ],
        ),
        migrations.CreateModel(
            name='Seller',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pmo', models.CharField(choices=[('unknown', 'unknown'), ('pmo2015', 'pmo2015'), ('pmo2016', 'pmo2016'), ('pmo2017', 'pmo2017'), ('pmo2018', 'pmo2018'), ('pmo2019', 'pmo2019')], default='unknown', help_text='漫展', max_length=10)),
                ('email', models.EmailField(max_length=30, verbose_name='email address')),
                ('is_active', models.BooleanField(default=False, help_text='是否激活')),
                ('signup_datetime', models.DateTimeField(auto_now=True)),
                ('signup_address', models.GenericIPAddressField()),
                ('is_stall', models.BooleanField(help_text='是否摊位')),
                ('circle_name', models.CharField(help_text='社团名', max_length=40)),
                ('circle_description', models.TextField(help_text='社团介绍')),
                ('circle_image', models.ImageField(help_text='社团图标', upload_to='circle/%Y/%m/%d')),
                ('seller_id', models.CharField(default='', help_text='摊位号', max_length=10)),
                ('proposer_name', models.CharField(help_text='申请人姓名', max_length=20)),
                ('proposer_sex', models.CharField(help_text='性别', max_length=20)),
                ('proposer_qq', models.CharField(help_text='QQ', max_length=11)),
                ('proposer_phone', models.CharField(help_text='电话', max_length=20)),
                ('proposer_id', models.CharField(help_text='身份证号', max_length=18)),
                ('booth', models.FloatField(default=1, help_text='申请摊位数')),
                ('number_of_people', models.SmallIntegerField(default=1, help_text='申请人数')),
                ('remarks', models.TextField(default='', help_text='备注')),
                ('status', models.IntegerField(help_text='状态')),
                ('notice', models.TextField(default='', help_text='通知')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ValidateCode',
            fields=[
                ('pmo', models.CharField(choices=[('unknown', 'unknown'), ('pmo2015', 'pmo2015'), ('pmo2016', 'pmo2016'), ('pmo2017', 'pmo2017'), ('pmo2018', 'pmo2018'), ('pmo2019', 'pmo2019')], default='unknown', help_text='漫展', max_length=10)),
                ('code', models.CharField(max_length=20, primary_key=True, serialize=False)),
                ('validated', models.BooleanField(default=False)),
                ('seller', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='stall.Seller')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ItemPicture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pmo', models.CharField(choices=[('unknown', 'unknown'), ('pmo2015', 'pmo2015'), ('pmo2016', 'pmo2016'), ('pmo2017', 'pmo2017'), ('pmo2018', 'pmo2018'), ('pmo2019', 'pmo2019')], default='unknown', help_text='漫展', max_length=10)),
                ('picture', models.ImageField(help_text='图片', max_length=1024, upload_to='items/%Y/%m/%d')),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='stall.Item')),
            ],
        ),
        migrations.AddField(
            model_name='item',
            name='seller',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='stall.Seller'),
        ),
    ]
