# Generated by Django 3.1.2 on 2020-12-10 05:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='ActivityInfo',
            fields=[
                ('act_release_time', models.DateTimeField(auto_created=True)),
                ('act_num', models.AutoField(primary_key=True, serialize=False)),
                ('act_type', models.CharField(max_length=10)),
                ('act_name', models.CharField(max_length=50)),
                ('act_held_time', models.CharField(max_length=20, null=True)),
                ('act_held_duration', models.CharField(max_length=20, null=True)),
                ('act_held_loca', models.CharField(max_length=100, null=True)),
                ('act_details', models.CharField(max_length=8000)),
                ('act_participant', models.CharField(max_length=20, null=True)),
                ('numberofp_limit', models.CharField(max_length=20, null=True)),
                ('act_appendix', models.FileField(null=True, upload_to='ActivityInfo_appendix')),
                ('act_image', models.ImageField(null=True, upload_to='ActivityInfo_image')),
            ],
        ),
        migrations.CreateModel(
            name='Classroom',
            fields=[
                ('classroom_num', models.CharField(max_length=10, primary_key=True, serialize=False)),
                ('classroom_cap', models.IntegerField()),
                ('classroom_borrowif', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('dp_num', models.CharField(max_length=2, primary_key=True, serialize=False)),
                ('dp_name', models.CharField(max_length=10)),
                ('dp_presentetion', models.CharField(max_length=500)),
                ('dp_image', models.ImageField(null=True, upload_to='Department_image')),
            ],
        ),
        migrations.CreateModel(
            name='MatterialRecord',
            fields=[
                ('m_num', models.IntegerField(primary_key=True, serialize=False)),
                ('m_name', models.CharField(max_length=20)),
                ('m_stock', models.CharField(max_length=3)),
                ('m_borrow_sta', models.CharField(max_length=6)),
            ],
        ),
        migrations.CreateModel(
            name='People',
            fields=[
                ('stu_num', models.IntegerField(primary_key=True, serialize=False)),
                ('stu_name', models.CharField(max_length=8)),
                ('password', models.CharField(max_length=12)),
                ('stu_sex', models.CharField(choices=[('F', 'female'), ('M', 'male')], max_length=1)),
                ('stu_phone', models.CharField(max_length=11)),
                ('stu_qq', models.CharField(blank=True, max_length=20)),
                ('stu_email', models.EmailField(blank=True, max_length=254)),
                ('stu_major', models.CharField(max_length=15)),
                ('stu_class', models.IntegerField()),
                ('stu_college', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='DpMembers',
            fields=[
                ('stu_num', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='chuanshanghui.people')),
                ('stu_post', models.CharField(max_length=6)),
                ('dp_num', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='chuanshanghui.department')),
            ],
        ),
        migrations.CreateModel(
            name='Reimbursement',
            fields=[
                ('reim_num', models.AutoField(primary_key=True, serialize=False)),
                ('invo_appendix', models.FileField(null=True, upload_to='Invoice_image', verbose_name='上传资金使用发票图片')),
                ('apply_time', models.DateTimeField(auto_now_add=True)),
                ('allow_time', models.DateTimeField(auto_now=True)),
                ('fund_pinchrage', models.BigIntegerField()),
                ('reim_state', models.CharField(max_length=6)),
                ('reim_to', models.ForeignKey(max_length=2, on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.department')),
            ],
        ),
        migrations.CreateModel(
            name='Goodslist',
            fields=[
                ('Goods_num', models.AutoField(primary_key=True, serialize=False)),
                ('Goods_name', models.CharField(max_length=500)),
                ('Goods_price', models.FloatField(blank=True, null=True)),
                ('Goods_qua', models.FloatField(blank=True, null=True)),
                ('Goods_total', models.FloatField(blank=True, null=True)),
                ('beizhu', models.CharField(max_length=500)),
                ('Goods_for_act', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.activityinfo')),
            ],
        ),
        migrations.CreateModel(
            name='FundRecord',
            fields=[
                ('fund_num', models.AutoField(primary_key=True, serialize=False)),
                ('fund_for_matt', models.CharField(max_length=200)),
                ('fund_amount', models.FloatField(blank=True, null=True)),
                ('fund_for_act', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.activityinfo')),
                ('fund_for_dp', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.department')),
                ('reim_num', models.ForeignKey(default=0, on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.reimbursement')),
            ],
        ),
        migrations.CreateModel(
            name='BorrowRecord',
            fields=[
                ('return_time', models.DateTimeField(auto_created=True)),
                ('borrow_num', models.IntegerField(primary_key=True, serialize=False)),
                ('borrow_type', models.CharField(choices=[('place', '场地'), ('matterial', '物资')], max_length=20)),
                ('borrow_name', models.CharField(max_length=20)),
                ('borrow_amount', models.IntegerField(default=1)),
                ('lent_for', models.CharField(max_length=200)),
                ('lent_time_range', models.DurationField(null=True)),
                ('lent_to_dp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='chuanshanghui.department')),
                ('object_num', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='chuanshanghui.matterialrecord')),
            ],
        ),
        migrations.CreateModel(
            name='Article',
            fields=[
                ('article_num', models.AutoField(primary_key=True, serialize=False, verbose_name='编号')),
                ('article_name', models.CharField(max_length=100, null=True, verbose_name='文章标题')),
                ('article_image', models.ImageField(null=True, upload_to='article_image', verbose_name='封面选择')),
                ('article_content', ckeditor_uploader.fields.RichTextUploadingField(help_text='内容', null=True, verbose_name='内容')),
                ('article_release_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='发布时间')),
                ('article_update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='最近更新时间')),
                ('article_is_delete', models.BooleanField(default=False, verbose_name='逻辑删除')),
                ('article_appendix', models.FileField(blank=True, null=True, upload_to='article_appendix', verbose_name='附件上传')),
                ('stu_num', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.people')),
            ],
        ),
        migrations.AddField(
            model_name='activityinfo',
            name='dp_num',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='chuanshanghui.department'),
        ),
        migrations.AddField(
            model_name='activityinfo',
            name='stu_num',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.people'),
        ),
        migrations.CreateModel(
            name='ActivityFile',
            fields=[
                ('actfile_num', models.IntegerField(primary_key=True, serialize=False)),
                ('act_name', models.CharField(max_length=50)),
                ('actfile_name', models.CharField(max_length=50)),
                ('actfile_appendix', models.FileField(upload_to='ActivityFile')),
                ('check_if', models.IntegerField()),
                ('act_dp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='chuanshanghui.department')),
            ],
        ),
        migrations.AddField(
            model_name='matterialrecord',
            name='m_pincharge',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.dpmembers'),
        ),
        migrations.CreateModel(
            name='Cooperation',
            fields=[
                ('coo_num', models.IntegerField(primary_key=True, serialize=False)),
                ('taskname', models.CharField(max_length=20)),
                ('contact_if', models.CharField(max_length=2)),
                ('release_date', models.DateTimeField(auto_now_add=True)),
                ('ddl', models.CharField(max_length=20)),
                ('task_details', models.CharField(max_length=200)),
                ('task_note', models.CharField(max_length=200, null=True)),
                ('aappendix', models.FileField(blank=True, null=True, upload_to='a_Cooperation')),
                ('bappendix', models.FileField(blank=True, null=True, upload_to='b_Cooperation')),
                ('task_state', models.CharField(max_length=6)),
                ('adp_num', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='chuanshanghui.department', verbose_name='任务发布部门')),
                ('bdp_num', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Department_bdp_num', to='chuanshanghui.department', verbose_name='任务接收部门')),
                ('astu_num', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.dpmembers', verbose_name='任务发布负责人')),
                ('bstu_num', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='Department_bdp_num', to='chuanshanghui.dpmembers', verbose_name='任务接收负责人')),
            ],
        ),
        migrations.CreateModel(
            name='ClassroomRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('room_for_matt', models.CharField(max_length=200)),
                ('room_for_dp', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.department')),
                ('room_num', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='room_cap', to='chuanshanghui.classroom')),
                ('room_pincharge', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.dpmembers')),
            ],
        ),
        migrations.CreateModel(
            name='CheckYesActfile',
            fields=[
                ('check_num', models.IntegerField(primary_key=True, serialize=False)),
                ('check_state', models.CharField(max_length=6)),
                ('actfile_num', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='chuanshanghui.activityfile')),
                ('check_dpmember_num', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, to='chuanshanghui.dpmembers')),
            ],
        ),
        migrations.CreateModel(
            name='ActivityFeedback',
            fields=[
                ('fb_num', models.AutoField(primary_key=True, serialize=False)),
                ('feedback', models.CharField(max_length=400)),
                ('refeedback', models.CharField(max_length=400, null=True)),
                ('feedback_time', models.DateTimeField(auto_now_add=True)),
                ('refeedback_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('if_anonymous', models.CharField(blank=True, choices=[('Y', '匿名'), ('N', '不匿名')], max_length=6, null=True)),
                ('act_num', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='chuanshanghui.activityinfo')),
                ('restu_num', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='chuanshanghui.people')),
                ('stu_num', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='chuanshanghui.dpmembers')),
            ],
        ),
    ]
