# Generated by Django 2.0.2 on 2018-05-19 17:29

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='ClientAccount',
            fields=[
                ('account_id', models.AutoField(primary_key=True, serialize=False)),
                ('account_type', models.CharField(max_length=15)),
                ('account_status', models.CharField(max_length=15)),
                ('start_datetime', models.DateTimeField()),
                ('end_datetime', models.DateTimeField()),
            ],
            options={
                'verbose_name_plural': 'Client Account',
            },
        ),
        migrations.CreateModel(
            name='ClientConfiguration',
            fields=[
                ('configuration_id', models.AutoField(primary_key=True, serialize=False)),
                ('configuration_type', models.CharField(max_length=20)),
                ('configuration_attribute', models.CharField(max_length=50)),
                ('configuration_value', models.CharField(max_length=50)),
                ('configuration_status', models.CharField(max_length=15)),
                ('configuration_start_datetime', models.DateTimeField()),
                ('configuration_end_datetime', models.DateTimeField()),
            ],
            options={
                'verbose_name_plural': 'Client Configurations',
            },
        ),
        migrations.CreateModel(
            name='ClientPayments',
            fields=[
                ('payment_id', models.AutoField(primary_key=True, serialize=False)),
                ('payment_type', models.CharField(max_length=15)),
                ('payment_date', models.DateField()),
                ('payment_amount', models.FloatField()),
                ('payment_currency', models.CharField(max_length=15)),
            ],
            options={
                'verbose_name_plural': 'Client Payments',
            },
        ),
        migrations.CreateModel(
            name='ClientRoles',
            fields=[
                ('role_id', models.AutoField(primary_key=True, serialize=False)),
                ('role_description', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name_plural': 'Client Roles',
            },
        ),
        migrations.CreateModel(
            name='MasterClient',
            fields=[
                ('client_id', models.AutoField(primary_key=True, serialize=False)),
                ('client_name', models.CharField(max_length=50)),
                ('client_email', models.CharField(blank=True, max_length=50, null=True)),
                ('client_mobile', models.CharField(blank=True, max_length=15, null=True)),
                ('client_status', models.CharField(choices=[('A', 'Active'), ('I', 'Inactive')], default='A', max_length=10)),
                ('registration_datetime', models.DateTimeField(auto_now_add=True, null=True)),
                ('registered_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='registered_by', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Master Client',
            },
        ),
        migrations.CreateModel(
            name='MasterClientInvoice',
            fields=[
                ('client_invoice_id', models.AutoField(primary_key=True, serialize=False)),
                ('invoice_datetime', models.DateTimeField()),
                ('invoice_amount', models.FloatField()),
                ('invoice_tax_id', models.IntegerField()),
                ('client_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='client_invoice', to='restaurant.MasterClient')),
            ],
            options={
                'verbose_name_plural': 'Client Invoices',
            },
        ),
        migrations.CreateModel(
            name='MasterDevice',
            fields=[
                ('device_id', models.AutoField(primary_key=True, serialize=False)),
                ('device_name', models.CharField(max_length=100)),
                ('device_type', models.CharField(max_length=50)),
                ('device_assigned_to', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='device_assigned', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Master Device',
            },
        ),
        migrations.CreateModel(
            name='MasterPremise',
            fields=[
                ('premise_id', models.AutoField(primary_key=True, serialize=False)),
                ('premise_name', models.CharField(blank=True, max_length=200, null=True)),
                ('premise_city', models.CharField(blank=True, max_length=50, null=True)),
                ('premise_pincode', models.CharField(blank=True, max_length=15, null=True)),
                ('premise_address', models.CharField(blank=True, max_length=300, null=True)),
                ('client_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='client_premise', to='restaurant.MasterClient')),
            ],
            options={
                'verbose_name_plural': 'Master Premise',
            },
        ),
        migrations.CreateModel(
            name='MasterRestaurant',
            fields=[
                ('restaurant_id', models.AutoField(primary_key=True, serialize=False)),
                ('restaurant_name', models.CharField(max_length=100)),
                ('client_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='client_restaurant', to='restaurant.MasterClient')),
            ],
            options={
                'verbose_name_plural': 'Master Restaurant',
            },
        ),
        migrations.CreateModel(
            name='PremiseSections',
            fields=[
                ('section_id', models.AutoField(primary_key=True, serialize=False)),
                ('section_name', models.CharField(blank=True, max_length=100, null=True)),
                ('section_details', models.CharField(blank=True, max_length=500, null=True)),
                ('premise_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='premise_section', to='restaurant.MasterPremise')),
            ],
            options={
                'verbose_name_plural': 'Master Premise Sections',
            },
        ),
        migrations.CreateModel(
            name='TransactionLog',
            fields=[
                ('transaction_id', models.AutoField(primary_key=True, serialize=False)),
                ('transaction_description', models.CharField(max_length=200)),
                ('transaction_type', models.CharField(max_length=30)),
                ('transaction_source', models.CharField(max_length=50)),
                ('transaction_identifier', models.CharField(max_length=50)),
                ('transaction_create_date', models.DateTimeField(auto_now_add=True, null=True)),
                ('transaction_created_by', models.CharField(max_length=100)),
                ('transaction_modified_date', models.DateTimeField(auto_now=True, null=True)),
                ('transaction_modified_by', models.CharField(max_length=100)),
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='client_transcation', to='restaurant.MasterClient')),
                ('premise', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='premise_transaction', to='restaurant.MasterPremise')),
            ],
            options={
                'verbose_name_plural': 'Transaction Log',
            },
        ),
        migrations.AddField(
            model_name='masterpremise',
            name='restaurant_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='restaurant_premise', to='restaurant.MasterRestaurant'),
        ),
        migrations.AddField(
            model_name='masterdevice',
            name='premise_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='premise_device', to='restaurant.MasterPremise'),
        ),
        migrations.AddField(
            model_name='masterclientinvoice',
            name='premise_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='premise_invoice', to='restaurant.MasterPremise'),
        ),
        migrations.AddField(
            model_name='clientroles',
            name='client_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='client_role', to='restaurant.MasterClient'),
        ),
        migrations.AddField(
            model_name='clientroles',
            name='premise_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='premise_role', to='restaurant.MasterPremise'),
        ),
        migrations.AddField(
            model_name='clientpayments',
            name='client_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='client_payment', to='restaurant.MasterClient'),
        ),
        migrations.AddField(
            model_name='clientpayments',
            name='customer_invoice_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='client_payment_invoice', to='restaurant.MasterClientInvoice'),
        ),
        migrations.AddField(
            model_name='clientconfiguration',
            name='client_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='client_configuration', to='restaurant.MasterClient'),
        ),
        migrations.AddField(
            model_name='clientconfiguration',
            name='premise_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='premise_configuration', to='restaurant.MasterPremise'),
        ),
        migrations.AddField(
            model_name='clientaccount',
            name='client_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='client_account', to='restaurant.MasterClient'),
        ),
        migrations.AddField(
            model_name='clientaccount',
            name='premise_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='premise_account', to='restaurant.MasterPremise'),
        ),
    ]
