# Generated by Django 4.0 on 2022-01-05 04:12

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('user', '0004_customer'),
        ('orders', '0005_alter_order_comments_alter_orderitem_comments'),
    ]

    operations = [
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('paid_amount', models.DecimalField(decimal_places=2, default=0, max_digits=9)),
                ('payment_date', models.DateTimeField()),
                ('mode_of_payment', models.CharField(default='cash', max_length=50)),
                ('created_by', models.CharField(default='', max_length=255)),
                ('updated_by', models.CharField(default='', max_length=255)),
                ('created_on', models.DateTimeField()),
                ('updated_on', models.DateTimeField()),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payments', related_query_name='payment', to='orders.order')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='payments', related_query_name='payment', to='user.user')),
            ],
            options={
                'ordering': ('-payment_date',),
            },
        ),
    ]
