# Generated by Django 4.0.1 on 2022-02-04 13:28

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Cashbox',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created_at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated_at')),
                ('data', models.JSONField(blank=True, null=True)),
                ('name', models.CharField(max_length=150, verbose_name='Name')),
                ('cash', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Cash')),
                ('account_money', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Account money')),
            ],
            options={
                'verbose_name': 'Cashbox',
                'verbose_name_plural': 'Cashboxes',
                'db_table': 'cashbox',
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created_at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated_at')),
                ('data', models.JSONField(blank=True, null=True)),
                ('name', models.CharField(max_length=150, verbose_name='Name')),
                ('code', models.CharField(max_length=150, null=True, verbose_name='Code')),
                ('barcode', models.CharField(max_length=150, null=True, verbose_name='Barcode')),
                ('purchase_price', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Purchase price')),
                ('sale_price', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Sale price')),
                ('count', models.IntegerField(verbose_name='Quantity')),
                ('supplier', models.CharField(max_length=150, verbose_name='Supplier')),
                ('irreducible_balance', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Irreducible balance')),
            ],
            options={
                'verbose_name': 'Product',
                'verbose_name_plural': 'Products',
                'db_table': 'product',
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='ProductCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created_at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated_at')),
                ('data', models.JSONField(blank=True, null=True)),
                ('name', models.CharField(max_length=150, verbose_name='Name')),
            ],
            options={
                'verbose_name': 'Category',
                'verbose_name_plural': 'Categories',
                'db_table': 'category',
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='ProductOrder',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created_at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated_at')),
                ('data', models.JSONField(blank=True, null=True)),
                ('name', models.CharField(max_length=150, verbose_name='Name')),
                ('price', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Price')),
            ],
            options={
                'verbose_name': 'ProductOrder',
                'verbose_name_plural': 'ProductOrders',
                'db_table': 'productorder',
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='PurchaseAccept',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created_at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated_at')),
                ('data', models.JSONField(blank=True, null=True)),
                ('is_cash', models.BooleanField(default=False)),
                ('accept', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'PurchaseAccept',
                'verbose_name_plural': 'PurchaseAccepts',
                'db_table': 'purchaseaccept',
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='PurchaseRequest',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created_at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated_at')),
                ('data', models.JSONField(blank=True, null=True)),
                ('price', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Price')),
                ('count', models.IntegerField(verbose_name='Quantity')),
                ('is_deferred', models.BooleanField(default=False, verbose_name='Deferred')),
                ('is_cash', models.BooleanField(verbose_name='Is cash')),
            ],
            options={
                'verbose_name': 'PurchaseRequest',
                'verbose_name_plural': 'PurchaseRequests',
                'db_table': 'purchaserequest',
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='SaleOrder',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created_at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated_at')),
                ('data', models.JSONField(blank=True, null=True)),
                ('cash', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Cash')),
                ('card', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Card')),
                ('bank_transfer', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Bank transfer')),
                ('discount', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Discount')),
            ],
            options={
                'verbose_name': 'SaleOrder',
                'verbose_name_plural': 'SaleOrders',
                'db_table': 'saleorder',
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='SaleProduct',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created_at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated_at')),
                ('data', models.JSONField(blank=True, null=True)),
                ('cash', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Cash')),
                ('card', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Card')),
                ('bank_transfer', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Bank transfer')),
                ('discount', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Discount')),
            ],
            options={
                'verbose_name': 'SaleProduct',
                'verbose_name_plural': 'SaleProducts',
                'db_table': 'saleproduct',
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created_at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated_at')),
                ('data', models.JSONField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'Transaction',
                'verbose_name_plural': 'Transactions',
                'db_table': 'transaction',
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='WorkDone',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created_at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated_at')),
                ('data', models.JSONField(blank=True, null=True)),
                ('name', models.CharField(max_length=150, verbose_name='Name')),
                ('price', models.DecimalField(decimal_places=2, max_digits=100, validators=[django.core.validators.MinValueValidator(0.0)], verbose_name='Price')),
            ],
            options={
                'verbose_name': 'WorkDone',
                'verbose_name_plural': 'WorkDones',
                'db_table': 'workdone',
                'ordering': ['-updated_at'],
            },
        ),
    ]
