# Generated by Django 2.1.3 on 2019-05-31 03:29

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Credit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('credit', models.IntegerField(default=0)),
                ('qrcode', models.ImageField(upload_to='credit/qrcode')),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('time', models.DateTimeField(auto_now=True)),
                ('address', models.CharField(max_length=200)),
                ('introduce', models.CharField(max_length=1000)),
                ('event_img', models.ImageField(upload_to='event')),
                ('qrcode', models.ImageField(upload_to='event/qrcode')),
            ],
        ),
        migrations.CreateModel(
            name='Favorite',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Food',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('food_img', models.ImageField(upload_to='food')),
                ('name', models.CharField(max_length=100)),
                ('credit', models.IntegerField(default=0)),
                ('qrcode', models.ImageField(upload_to='food/qrcode')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Event')),
            ],
        ),
        migrations.CreateModel(
            name='History',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now=True)),
                ('credit', models.CharField(max_length=10)),
                ('desc', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='LastFood',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('food_img', models.ImageField(upload_to='food')),
                ('name', models.CharField(max_length=100)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Event')),
            ],
        ),
        migrations.CreateModel(
            name='Lunch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=100)),
                ('img', models.ImageField(upload_to='lunch')),
                ('credit', models.IntegerField(default=0)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Event')),
            ],
        ),
        migrations.CreateModel(
            name='LunchReservation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('lunch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Lunch')),
            ],
        ),
        migrations.CreateModel(
            name='OnlyOnceCredit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('credit', models.IntegerField(default=0)),
                ('qrcode', models.ImageField(upload_to='credit/qrcode')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Event')),
            ],
        ),
        migrations.CreateModel(
            name='RoomAmenity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=100)),
                ('img', models.ImageField(upload_to='roomAmenity')),
                ('credit', models.IntegerField(default=0)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Event')),
            ],
        ),
        migrations.CreateModel(
            name='RoomAmenityReservation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('roomAmenity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.RoomAmenity')),
            ],
        ),
        migrations.CreateModel(
            name='TeaBreak',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('img', models.ImageField(upload_to='teaBreak')),
                ('text', models.CharField(default='', max_length=5000)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(default='', max_length=100, verbose_name='username')),
                ('password', models.CharField(default='', max_length=100, verbose_name='password')),
                ('union_id', models.CharField(max_length=200)),
                ('nickname', models.CharField(max_length=200)),
                ('head_img', models.CharField(max_length=500)),
                ('credit', models.IntegerField(default=0)),
                ('status', models.IntegerField(choices=[(0, 'consumer'), (1, 'provider'), (2, 'host')])),
                ('qrcode', models.ImageField(default='', upload_to='user/qrcode')),
                ('name', models.CharField(default='', max_length=100, verbose_name='name')),
                ('hotel_name', models.CharField(default='', max_length=100, verbose_name='hotel_name')),
                ('email', models.CharField(default='', max_length=100, verbose_name='email')),
                ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Event')),
            ],
        ),
        migrations.CreateModel(
            name='UserFood',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('food', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Food')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.User')),
            ],
        ),
        migrations.CreateModel(
            name='UserScan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('credit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.OnlyOnceCredit')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.User')),
            ],
        ),
        migrations.AddField(
            model_name='roomamenityreservation',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.User'),
        ),
        migrations.AddField(
            model_name='lunchreservation',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.User'),
        ),
        migrations.AddField(
            model_name='history',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.User'),
        ),
        migrations.AddField(
            model_name='food',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.User'),
        ),
        migrations.AddField(
            model_name='favorite',
            name='food',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Food'),
        ),
        migrations.AddField(
            model_name='favorite',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.User'),
        ),
        migrations.AddField(
            model_name='credit',
            name='event',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Event'),
        ),
    ]
