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


class Migration(migrations.Migration):

    dependencies = [
        ("shipment", "0017_salesitemchangerecord"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name="salesitem",
            name="delete_at",
            field=models.DateTimeField(blank=True, null=True, verbose_name="删除时间"),
        ),
        migrations.AddField(
            model_name="salesitem",
            name="delete_by",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="deleted_sales_items",
                to=settings.AUTH_USER_MODEL,
                verbose_name="删除人",
            ),
        ),
        migrations.AlterModelOptions(
            name="salesitem",
            options={
                "ordering": ["id"],
                "permissions": [("soft_delete_salesitem", "Can soft delete sales item")],
                "verbose_name": "销售品",
                "verbose_name_plural": "销售品",
            },
        ),
    ]
