# Generated by Django 3.0.5 on 2020-07-17 03:17

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Administrator',
            fields=[
                ('aId', models.CharField(max_length=8, primary_key=True, serialize=False)),
                ('aPwd', models.CharField(max_length=8)),
                ('aName', models.CharField(max_length=20)),
                ('aGender', models.CharField(max_length=8)),
                ('aAge', models.CharField(max_length=4)),
            ],
        ),
        migrations.CreateModel(
            name='Menu',
            fields=[
                ('mId', models.CharField(max_length=8, primary_key=True, serialize=False)),
                ('mName', models.CharField(max_length=15)),
                ('price', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Restaurant',
            fields=[
                ('rId', models.CharField(max_length=8, primary_key=True, serialize=False)),
                ('rPwd', models.CharField(max_length=8)),
                ('rName', models.CharField(max_length=15)),
                ('rAddr', models.CharField(max_length=2)),
                ('rTel', models.CharField(max_length=15)),
                ('dysy', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('uId', models.CharField(max_length=8, primary_key=True, serialize=False)),
                ('uPwd', models.CharField(max_length=8)),
                ('uName', models.CharField(max_length=10)),
                ('uAddr', models.CharField(max_length=20)),
                ('uPhone', models.CharField(max_length=15)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('oId', models.AutoField(primary_key=True, serialize=False)),
                ('oTime', models.DateTimeField()),
                ('number', models.IntegerField()),
                ('money', models.IntegerField()),
                ('menuId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Platform.Menu')),
                ('userId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Platform.User')),
            ],
        ),
        migrations.AddField(
            model_name='menu',
            name='restaurantId',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Platform.Restaurant'),
        ),
    ]
