# Generated by Django 2.0.3 on 2018-04-25 17:27

import ckeditor_uploader.fields
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='Answer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'verbose_name_plural': '问卷答案表',
            },
        ),
        migrations.CreateModel(
            name='CompanyBasicInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('organization_category', models.IntegerField(choices=[(1, '股份有限公司'), (2, '有限责任公司'), (3, '非公司制企业'), (4, '私营独资企业'), (5, '私营合伙企业'), (6, '其他')], verbose_name='组织类别')),
                ('industry_classification', models.IntegerField(choices=[(1, '农业'), (2, '林业'), (3, '水利'), (4, '电力'), (5, '热力'), (6, '批发'), (7, '住宿'), (8, '采矿业'), (9, '制造业'), (10, '建筑业'), (11, '零售业'), (12, '餐饮业'), (13, '物业管理'), (14, '房地产业'), (15, '信息传输业'), (16, '交通运输业'), (17, '畜牧业和渔业'), (18, '仓诸和邮电业'), (19, '租赁和商务服务业'), (20, '文化、体育和娱乐业'), (21, '科学研究和技术服务业'), (22, '软件和信息技术服务业'), (23, '燃气及水生产和供应业'), (24, '环境和公共设施管理业'), (25, '居民服务、修理和其他服务业'), (26, '其他未列明行业')], verbose_name='产业分类')),
                ('registered_fund', models.CharField(max_length=10, verbose_name='注册资金(万元)')),
                ('annual_revenue', models.CharField(max_length=10, verbose_name='企业年营业收入(万元)')),
                ('current_number_of_employees', models.CharField(max_length=5, verbose_name='现从业人数')),
                ('college_degree_or_above', models.CharField(max_length=5, verbose_name='大专及以上学历人数')),
                ('intermediate_and_above_titles', models.CharField(max_length=5, verbose_name='中级及以上职称人数')),
            ],
            options={
                'verbose_name_plural': '企业基本情况管理',
            },
        ),
        migrations.CreateModel(
            name='InformationOfPerson',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('company_name', models.CharField(max_length=200, verbose_name='企业名称')),
                ('social_credit_code', models.CharField(max_length=18, verbose_name='社会统一信用代码')),
                ('phone', models.CharField(max_length=11, verbose_name='联系电话（手机）')),
                ('responsible_person', models.CharField(max_length=30, verbose_name='企业负责人姓名')),
                ('sex', models.IntegerField(choices=[(1, '男'), (2, '女')], verbose_name='性别')),
                ('political_status', models.CharField(max_length=30, verbose_name='政治面貌')),
                ('age', models.IntegerField(choices=[(1, '30岁以下'), (2, '31-40岁'), (3, '41-50岁'), (4, '51岁以上')], verbose_name='年龄')),
                ('degree_of_education', models.IntegerField(choices=[(1, '初中'), (2, '高中(中专)'), (3, '大专'), (4, '本科'), (5, '本科以上')], verbose_name='文化程度')),
                ('company_registered_address', models.CharField(max_length=200, verbose_name='公司注册地址')),
                ('established_time', models.DateField(verbose_name='成立时间')),
                ('website_url', models.URLField(blank=True, verbose_name='公司网址')),
                ('email_adress', models.EmailField(max_length=254, verbose_name='电子邮件地址')),
                ('company_profiles', models.TextField(blank=True, verbose_name='公司介绍')),
            ],
            options={
                'verbose_name_plural': '企业基本信息管理',
            },
        ),
        migrations.CreateModel(
            name='Option',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('option_content', models.CharField(max_length=50, verbose_name='选项内容')),
                ('option_visible', models.BooleanField(default=True, verbose_name='选项是否可见')),
            ],
            options={
                'verbose_name_plural': '选项管理',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Questionnaire',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50, verbose_name='问卷名')),
                ('questionnaire_explain', ckeditor_uploader.fields.RichTextUploadingField(verbose_name='问卷说明')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('last_updated_time', models.DateTimeField(auto_now=True, verbose_name='最后修改的时间')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='作者')),
            ],
            options={
                'verbose_name_plural': '问卷管理',
                'ordering': ['-create_time'],
            },
        ),
        migrations.CreateModel(
            name='Questions',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_name', models.CharField(max_length=50, verbose_name='问题题目')),
                ('question_visible', models.BooleanField(default=True, verbose_name='题目是否可见')),
                ('multi_select_boolean', models.BooleanField(default=True, verbose_name='题目是否多选')),
                ('questionnaire', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainsite.Questionnaire', verbose_name='对应的问卷')),
            ],
            options={
                'verbose_name_plural': '选择题问题管理',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Questions_Char',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_char_name', models.CharField(max_length=20, verbose_name='填写类问题标题')),
                ('question_char_content', models.CharField(max_length=500, verbose_name='填写类问题内容')),
                ('questionnaire', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainsite.Questionnaire', verbose_name='对应的问卷')),
            ],
            options={
                'verbose_name_plural': '填写类问题管理',
            },
        ),
        migrations.AddField(
            model_name='option',
            name='questionnaire',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mainsite.Questionnaire', verbose_name='对应的问卷'),
        ),
        migrations.AddField(
            model_name='option',
            name='questions',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainsite.Questions', verbose_name='对应的问题'),
        ),
        migrations.AddField(
            model_name='companybasicinfo',
            name='info_of_company',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='mainsite.InformationOfPerson', verbose_name='归属于哪个企业'),
        ),
        migrations.AddField(
            model_name='answer',
            name='option',
            field=models.ManyToManyField(related_name='answer_option', to='mainsite.Option'),
        ),
        migrations.AddField(
            model_name='answer',
            name='que_owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainsite.InformationOfPerson', verbose_name='答案归属人'),
        ),
        migrations.AddField(
            model_name='answer',
            name='questionnaire',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mainsite.Questionnaire', verbose_name='对应的问卷'),
        ),
        migrations.AddField(
            model_name='answer',
            name='questions',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainsite.Questions', verbose_name='所属问题'),
        ),
    ]
