# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2018-05-31 03:34
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('accounts', '0001_initial'),
        ('product', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否激活')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now_add=True, verbose_name='更新时间')),
                ('total_fee', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='总价')),
                ('channel', models.CharField(blank=True, choices=[('Z', '支付宝支付'), ('W', '微信支付')], max_length=1, null=True, verbose_name='支付渠道')),
                ('is_payment', models.BooleanField(default=False, verbose_name='是否付款')),
                ('is_delivery', models.BooleanField(default=False, verbose_name='是否发货')),
                ('is_refound', models.BooleanField(default=False, verbose_name='是否退款')),
                ('is_received', models.BooleanField(default=False, verbose_name='是否赠送')),
                ('remarks', models.CharField(blank=True, max_length=1024, null=True, verbose_name='备注')),
                ('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='order_product', to='product.Product', verbose_name='商品')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='order_user', to='accounts.User_profile', verbose_name='用户')),
            ],
            options={
                'verbose_name': '订单',
                'verbose_name_plural': '订单',
                'ordering': ['-update_time'],
            },
        ),
    ]
