# Generated by Django 3.0.6 on 2020-05-28 19:20

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Business',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('phone_number', models.TextField(max_length=15)),
                ('score', models.FloatField(default=0)),
                ('address', models.TextField(max_length=500)),
                ('description', models.TextField(default='test', max_length=600)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='Reserve',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('description', models.TextField()),
                ('date', models.CharField(max_length=150)),
                ('isCancelled', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('paidAt', models.DateTimeField()),
                ('amount', models.FloatField()),
                ('reserve', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='API.Reserve')),
            ],
        ),
        migrations.CreateModel(
            name='TimeTable',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('business', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='timetables', to='API.Business')),
            ],
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=30)),
                ('address', models.TextField(max_length=500)),
                ('fee', models.FloatField()),
                ('rating', models.FloatField(default=0)),
                ('description', models.TextField(blank=True, max_length=600)),
                ('cancellation_range', models.CharField(default='00:00', max_length=5)),
                ('business', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='services', to='API.Business')),
                ('timetable', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='API.TimeTable')),
            ],
        ),
        migrations.CreateModel(
            name='Sans',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('startTime', models.CharField(default='00:00', max_length=5)),
                ('endTime', models.CharField(default='00:00', max_length=5)),
                ('weekDay', models.PositiveSmallIntegerField(default=0)),
                ('timeTable', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='sanses', to='API.TimeTable')),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('description', models.CharField(default='', max_length=600)),
                ('rating', models.FloatField()),
                ('reserve', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='API.Reserve')),
            ],
        ),
        migrations.AddField(
            model_name='reserve',
            name='sans',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='API.Sans'),
        ),
        migrations.AddField(
            model_name='reserve',
            name='service',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='API.Service'),
        ),
        migrations.AddField(
            model_name='reserve',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('address', models.CharField(max_length=200, null=True)),
                ('message', models.TextField(null=True)),
                ('business', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='pictures', to='API.Business')),
                ('service', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='pictures', to='API.Service')),
            ],
        ),
        migrations.AddField(
            model_name='business',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='businesses', to='API.Category'),
        ),
        migrations.AddField(
            model_name='business',
            name='owner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL),
        ),
    ]
