1234567891011121314151617181920212223242526272829303132333435 |
- # Generated by Django 4.1.2 on 2025-07-22 20:03
- from decimal import Decimal
- from django.db import migrations, models
- import django.db.models.deletion
- class Migration(migrations.Migration):
- dependencies = [
- ('bound', '0024_alter_batchlogmodel_goods_qty_and_more'),
- ('container', '0025_alter_containerdetaillogmodel_log_type'),
- ]
- operations = [
- migrations.CreateModel(
- name='batchLogModel',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('log_type', models.CharField(choices=[('create', '创建'), ('update', '更新'), ('delete', '删除'), ('out', '出库'), ('cancel_out', '取消出库'), ('status_change', '状态变更')], max_length=20, verbose_name='日志类型')),
- ('goods_code', models.CharField(max_length=50, verbose_name='货品编码')),
- ('goods_desc', models.CharField(max_length=100, verbose_name='货品描述')),
- ('old_goods_qty', models.DecimalField(blank=True, decimal_places=3, default=Decimal('0'), max_digits=10, null=True, verbose_name='原数量')),
- ('new_goods_qty', models.DecimalField(blank=True, decimal_places=3, default=Decimal('0'), max_digits=10, null=True, verbose_name='新数量')),
- ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
- ('batch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='logs', to='bound.boundbatchmodel')),
- ],
- options={
- 'verbose_name': '批次日志',
- 'verbose_name_plural': '批次日志',
- 'db_table': 'batch_log',
- 'ordering': ['-create_time'],
- },
- ),
- ]
|