# Generated by Django 2.2.2 on 2020-03-08 10:47

import apps.orders.helpers
from django.db import migrations, models
import django.db.models.deletion
import jsonfield.fields


class Migration(migrations.Migration):

    dependencies = [
        ('products', '0014_auto_20200308_0535'),
        ('orders', '0003_order'),
    ]

    operations = [
        migrations.CreateModel(
            name='LineItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('deleted', models.BooleanField(default=False)),
                ('shopify_line_item_id', models.BigIntegerField(unique=True)),
                ('title', models.CharField(blank=True, max_length=500, null=True)),
                ('quantity', models.IntegerField()),
                ('sku', models.CharField(blank=True, max_length=48, null=True)),
                ('variant_title', models.CharField(blank=True, max_length=500, null=True)),
                ('vendor', models.CharField(blank=True, max_length=64, null=True)),
                ('fulfillment_service', models.CharField(blank=True, max_length=64, null=True)),
                ('requires_shipping', models.BooleanField(default=True)),
                ('taxable', models.BooleanField(default=False)),
                ('gift_card', models.BooleanField(default=False)),
                ('name', models.CharField(blank=True, max_length=256, null=True)),
                ('variant_inventory_management', models.CharField(max_length=256)),
                ('properties', jsonfield.fields.JSONField(default=apps.orders.helpers.empty_list)),
                ('product_exists', models.BooleanField(default=True)),
                ('fulfillable_quantity', models.IntegerField()),
                ('grams', models.DecimalField(decimal_places=2, max_digits=9)),
                ('price', models.DecimalField(decimal_places=2, max_digits=9)),
                ('total_discount', models.DecimalField(decimal_places=2, max_digits=9)),
                ('fulfillment_status', models.CharField(blank=True, max_length=32, null=True)),
                ('price_set', jsonfield.fields.JSONField(default=apps.orders.helpers.empty_dict)),
                ('total_discount_set', jsonfield.fields.JSONField(default=apps.orders.helpers.empty_dict)),
                ('discount_allocations', jsonfield.fields.JSONField(default=apps.orders.helpers.empty_list)),
                ('tax_lines', jsonfield.fields.JSONField(default=apps.orders.helpers.empty_list)),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_items', to='orders.Order')),
                ('product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='line_items', to='products.Product')),
                ('variant', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='line_items', to='products.Variant')),
            ],
            options={
                'verbose_name': 'LineItem',
                'verbose_name_plural': 'LineItems',
                'db_table': 'line_item',
            },
        ),
    ]
