# Generated by Django 2.0.2 on 2019-04-11 15:07

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Act2Stu',
            fields=[
                ('a2s_num', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')),
                ('a2s_signtime', models.DateTimeField(verbose_name='签到时间')),
                ('a2s_signup', models.BooleanField(default=False, verbose_name='是否报名')),
            ],
            options={
                'verbose_name': '关联表',
                'verbose_name_plural': '关联表',
                'db_table': 'act2stu',
                'ordering': ['pk'],
            },
        ),
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('a_number', models.AutoField(primary_key=True, serialize=False, verbose_name='活动ID')),
                ('a_name', models.CharField(max_length=50, verbose_name='名称')),
                ('a_address', models.CharField(max_length=50, verbose_name='地址')),
                ('a_type', models.CharField(max_length=50, verbose_name='类型')),
                ('a_needsign', models.BooleanField(default=False, verbose_name='需不需报名')),
                ('a_starttime', models.DateTimeField(verbose_name='开始时间')),
                ('a_endtime', models.DateTimeField(verbose_name='结束时间')),
                ('a_theme', models.CharField(max_length=500, verbose_name='主题')),
                ('a_startsign', models.DateTimeField(verbose_name='开始签到')),
                ('a_endsign', models.DateTimeField(verbose_name='截止签到')),
                ('a_grade', models.IntegerField(verbose_name='举办年级')),
                ('a_host', models.CharField(max_length=50, verbose_name='举办方')),
            ],
            options={
                'verbose_name': '活动表',
                'verbose_name_plural': '活动表',
                'db_table': 'Activity',
                'ordering': ['pk'],
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('u_number', models.IntegerField(primary_key=True, serialize=False, verbose_name='学号')),
                ('u_name', models.CharField(max_length=30, verbose_name='姓名')),
                ('u_gender', models.BooleanField(choices=[(0, '女'), (1, '男')], default=True, verbose_name='性别')),
                ('u_privilege', models.IntegerField(choices=[(0, '普通'), (1, '管理员')], verbose_name='权限')),
                ('u_class', models.CharField(max_length=50, verbose_name='班级')),
                ('u_major', models.CharField(max_length=50, verbose_name='专业')),
                ('u_password', models.CharField(max_length=512, verbose_name='密码')),
                ('u_email', models.CharField(max_length=50, verbose_name='邮箱')),
                ('u_openid', models.CharField(max_length=30, verbose_name='openID')),
            ],
            options={
                'verbose_name': '用户表',
                'verbose_name_plural': '用户表',
                'db_table': 'userInfo',
                'ordering': ['u_number'],
            },
        ),
        migrations.AddField(
            model_name='activity',
            name='a_creator',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='signSystem.User', verbose_name='创建人'),
        ),
        migrations.AddField(
            model_name='act2stu',
            name='a2s_actnum',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='signSystem.Activity', verbose_name='活动ID'),
        ),
        migrations.AddField(
            model_name='act2stu',
            name='ats_stunum',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='signSystem.User', verbose_name='学号'),
        ),
    ]
