# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-08-31 09:30
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone_number', models.CharField(blank=True, max_length=17, validators=[django.core.validators.RegexValidator(message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", regex='^\\+?1?\\d{9,15}$')])),
                ('first_name', models.CharField(max_length=50)),
                ('last_name', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('made', 'оформленый'), ('approved', 'подтвержденный'), ('mailed', 'отправленый'), ('paid', 'оплаченый')], max_length=8)),
                ('address', models.CharField(max_length=1024)),
                ('data', models.DateTimeField(auto_now_add=True)),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ordering.Customer')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='customer',
            unique_together=set([('first_name', 'last_name', 'phone_number')]),
        ),
    ]
