# Generated by Django 2.2.5 on 2019-10-02 02:34

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='优惠券',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('优惠券名称', models.CharField(max_length=50)),
                ('优惠券折扣', models.DecimalField(decimal_places=2, max_digits=7)),
                ('关联手机号', models.CharField(blank=True, max_length=16)),
                ('备注', models.TextField(blank=True)),
            ],
            options={
                'verbose_name': '优惠券',
                'verbose_name_plural': '优惠券',
            },
        ),
        migrations.CreateModel(
            name='学生',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('学生姓名', models.CharField(max_length=12)),
                ('备注', models.TextField(blank=True)),
            ],
            options={
                'verbose_name': '学生',
                'verbose_name_plural': '学生',
            },
        ),
        migrations.CreateModel(
            name='班',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('班名称', models.CharField(max_length=50)),
                ('上课时间', models.CharField(max_length=50)),
                ('上课教室', models.CharField(max_length=50)),
                ('备注', models.TextField(blank=True)),
            ],
            options={
                'verbose_name': '班',
                'verbose_name_plural': '班',
            },
        ),
        migrations.CreateModel(
            name='老师',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('老师姓名', models.CharField(max_length=12)),
                ('老师电话', models.CharField(max_length=16)),
                ('备注', models.TextField(blank=True)),
            ],
            options={
                'verbose_name': '老师',
                'verbose_name_plural': '老师',
            },
        ),
        migrations.CreateModel(
            name='课程',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('课程名称', models.CharField(max_length=50)),
                ('课程定价', models.DecimalField(decimal_places=2, max_digits=7)),
                ('课程介绍', models.TextField(blank=True)),
            ],
            options={
                'verbose_name': '课程',
                'verbose_name_plural': '课程',
            },
        ),
        migrations.CreateModel(
            name='缴费',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('缴费时间', models.DateTimeField(auto_now_add=True)),
                ('缴费金额', models.DecimalField(decimal_places=2, max_digits=7)),
                ('备注', models.TextField(blank=True)),
                ('缴费学生', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='infoManage.学生')),
                ('缴费项目', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='infoManage.课程')),
            ],
            options={
                'verbose_name': '缴费',
                'verbose_name_plural': '缴费',
            },
        ),
        migrations.CreateModel(
            name='班级分配',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('备注', models.TextField(blank=True)),
                ('学生编号', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='infoManage.学生')),
                ('班编号', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='infoManage.班')),
            ],
            options={
                'verbose_name': '班级分配',
                'verbose_name_plural': '班级分配',
            },
        ),
        migrations.AddField(
            model_name='班',
            name='老师编号',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='infoManage.老师'),
        ),
        migrations.AddField(
            model_name='班',
            name='课程编号',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='infoManage.课程'),
        ),
        migrations.CreateModel(
            name='家长联系方式',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('家长姓名', models.CharField(blank=True, max_length=12)),
                ('联系电话', models.CharField(blank=True, max_length=16)),
                ('与学生关系', models.CharField(blank=True, max_length=20)),
                ('学生编号', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='infoManage.学生')),
            ],
            options={
                'verbose_name': '家长联系方式',
                'verbose_name_plural': '家长联系方式',
            },
        ),
        migrations.CreateModel(
            name='优惠券使用',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('备注', models.TextField(blank=True)),
                ('优惠券编号', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='infoManage.优惠券')),
                ('缴费单号', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='infoManage.缴费')),
            ],
            options={
                'verbose_name': '优惠券使用',
                'verbose_name_plural': '优惠券使用',
            },
        ),
    ]
