# Generated by Django 2.2.14 on 2020-07-31 13:40

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('authorname', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cityname', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Info',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gender', models.SmallIntegerField(verbose_name=((0, '保密'), (1, '男'), (2, '女')))),
                ('addr', models.CharField(max_length=255)),
                ('age', models.IntegerField(default=1)),
            ],
        ),
        migrations.CreateModel(
            name='Publish',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('publishname', models.CharField(max_length=255)),
                ('tel', models.CharField(max_length=15)),
                ('email', models.EmailField(max_length=254)),
                ('city', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='app02.City')),
            ],
        ),
        migrations.CreateModel(
            name='Books',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bookname', models.CharField(max_length=255)),
                ('bookprice', models.DecimalField(decimal_places=2, max_digits=6)),
                ('pub_date', models.DateField()),
                ('author', models.ManyToManyField(to='app02.Author')),
                ('publish', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app02.Publish')),
            ],
        ),
        migrations.AddField(
            model_name='author',
            name='authorinfo',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='app02.Info'),
        ),
    ]
