# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2019-04-14 21:33
from __future__ import unicode_literals

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='CarPostion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_member', models.BooleanField(default=False, verbose_name='会员位')),
                ('is_valid', models.BooleanField(default=True, verbose_name='可用状态')),
                ('plate_number', models.CharField(blank=True, default='', max_length=32, null=True, verbose_name='车牌号')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': 'car_postion',
                'verbose_name_plural': 'car_postion',
                'db_table': 'car_postion',
            },
        ),
        migrations.CreateModel(
            name='Member',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=128, verbose_name='用户名')),
                ('phone', models.CharField(blank=True, default='', max_length=12, null=True, verbose_name='手机号码')),
                ('identity_card', models.CharField(max_length=18, verbose_name='身份证')),
                ('plate_number', models.CharField(max_length=32, verbose_name='车牌号')),
                ('member_type', models.CharField(choices=[('quarter', '包季'), ('year', '包年')], default='quarter', max_length=32, verbose_name='会员类型')),
                ('type', models.IntegerField(choices=[(1, '轿车'), (2, 'SUV'), (3, 'MPV'), (4, '跑车'), (5, '皮卡'), (6, '微面')], default=1, verbose_name='类型')),
                ('color', models.CharField(blank=True, default='', max_length=32, null=True, verbose_name='颜色')),
                ('expire_time', models.DateTimeField(blank=True, default=None, null=True, verbose_name='到期时间')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('creator', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'members',
                'verbose_name_plural': 'members',
                'db_table': 'members',
                'ordering': ['-created_time'],
            },
        ),
        migrations.CreateModel(
            name='MemberAmount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('money', models.FloatField(default=300.0, verbose_name='金额')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('member', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='park.Member', verbose_name='会员ID')),
            ],
            options={
                'verbose_name': 'member_amount',
                'verbose_name_plural': 'member_amount',
                'db_table': 'member_amount',
                'ordering': ['-created_time'],
            },
        ),
        migrations.CreateModel(
            name='TempAmount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('enter_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='进入时间')),
                ('leave_time', models.DateTimeField(blank=True, default=None, null=True, verbose_name='离开时间')),
                ('time_duration', models.FloatField(blank=True, default=0.0, null=True, verbose_name='时长')),
                ('plate_number', models.CharField(blank=True, default='', max_length=32, null=True, verbose_name='车牌号')),
                ('is_member', models.BooleanField(default=False, verbose_name='会员')),
                ('money', models.FloatField(blank=True, default=0.0, null=True, verbose_name='金额')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('creator', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('postion', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='park.CarPostion', verbose_name='停车位')),
            ],
            options={
                'verbose_name': 'temp_amount',
                'verbose_name_plural': 'temp_amount',
                'db_table': 'temp_amount',
                'ordering': ['-created_time'],
            },
        ),
        migrations.AddField(
            model_name='carpostion',
            name='member',
            field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='park.Member', verbose_name='会员ID'),
        ),
    ]
