# Generated by Django 3.0.7 on 2021-04-06 03:28

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Car',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField(max_length=100)),
                ('type', models.CharField(max_length=100)),
                ('start_date', models.DateField(null=True)),
                ('expire_date', models.DateField(null=True)),
            ],
            options={
                'db_table': 'cars',
            },
        ),
        migrations.CreateModel(
            name='Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('entry_time', models.TimeField(auto_now_add=True)),
                ('departure_time', models.TimeField(null=True)),
                ('parking_time', models.TimeField(null=True)),
                ('car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='entrance.Car')),
            ],
            options={
                'db_table': 'records',
            },
        ),
        migrations.CreateModel(
            name='PaymentRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('paid_amount', models.IntegerField(max_length=100)),
                ('discount_amount', models.IntegerField(max_length=100, null=True)),
                ('total_paid_amount', models.IntegerField(max_length=100, null=True)),
                ('paid_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('payment_success', models.BooleanField(null=True)),
                ('payment_method', models.CharField(max_length=100, null=True)),
                ('record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='entrance.Record')),
            ],
            options={
                'db_table': 'payment_records',
            },
        ),
    ]
