# Generated by Django 3.2.9 on 2021-11-19 17:07

import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Area',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('boundary', django.contrib.gis.db.models.fields.PolygonField(srid=4326)),
                ('center_lat', models.DecimalField(decimal_places=20, max_digits=30)),
                ('center_lng', models.DecimalField(decimal_places=20, max_digits=30)),
                ('coords', django.contrib.gis.db.models.fields.LineStringField(srid=4326)),
            ],
            options={
                'db_table': 'areas',
            },
        ),
        migrations.CreateModel(
            name='ForbiddenArea',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('boundary', django.contrib.gis.db.models.fields.PolygonField(srid=4326)),
                ('coords', django.contrib.gis.db.models.fields.LineStringField(srid=4326)),
            ],
            options={
                'db_table': 'forbidden_areas',
            },
        ),
        migrations.CreateModel(
            name='RatePlan',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('basic', models.PositiveIntegerField()),
                ('per_minute', models.PositiveIntegerField()),
            ],
            options={
                'db_table': 'rate_plans',
            },
        ),
        migrations.CreateModel(
            name='ParkingZone',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('center_lat', models.DecimalField(decimal_places=20, max_digits=30)),
                ('center_lng', models.DecimalField(decimal_places=20, max_digits=30)),
                ('radius', models.DecimalField(decimal_places=20, max_digits=30)),
                ('area', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='areas.area')),
            ],
            options={
                'db_table': 'parking_zones',
            },
        ),
        migrations.AddField(
            model_name='area',
            name='rate_plan',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='areas.rateplan'),
        ),
    ]
