text: # Generated by Django 3.2.7 on 2021-09-24 02:07
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          ('suppliers', '0006_auto_20210923_2202'),
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Bill',
              fields=[
                  ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('purchase_order_number', models.CharField(max_length=100)),
                  ('slug', models.SlugField(max_length=100, unique=True)),
                  ('file', models.FileField(upload_to='purchases/bills/')),
                  ('total', models.DecimalField(decimal_places=2, max_digits=10)),
                  ('paid', models.BooleanField(default=False)),
                  ('created_by', models.ForeignKey(default=1, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='bill_created', to=settings.AUTH_USER_MODEL)),
                  ('supplier', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bills', to='suppliers.supplier')),
                  ('updated_by', models.ForeignKey(default=1, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='bill_updated', to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'ordering': ['-created_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)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('name', models.CharField(max_length=100)),
                  ('slug', models.SlugField(max_length=100, unique=True)),
                  ('description', models.TextField(blank=True)),
                  ('price', models.DecimalField(decimal_places=2, max_digits=10)),
                  ('stock', models.IntegerField()),
                  ('bill', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='purchases.bill')),
                  ('created_by', models.ForeignKey(default=1, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='product_created', to=settings.AUTH_USER_MODEL)),
                  ('updated_by', models.ForeignKey(default=1, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='product_updated', to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'ordering': ['-created_at'],
              },
          ),
      ]
  