1
0
forked from erp-dev/erp
Files
erpnew/api_v1/migrations/0013_printingexternalsyncfailure_and_more.py
2026-03-20 20:00:12 +08:00

45 lines
2.4 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Generated by Django 5.2.8 on 2026-03-20 00:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api_v1', '0012_datasync_merchant'),
]
operations = [
migrations.CreateModel(
name='PrintingExternalSyncFailure',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
('run_date', models.DateField(db_index=True, verbose_name='任务日期')),
('external_record_id', models.PositiveBigIntegerField(db_index=True, verbose_name='外部记录ID')),
('external_order_id', models.CharField(blank=True, max_length=100, verbose_name='外部订单编号')),
('product_name', models.CharField(blank=True, max_length=200, verbose_name='外部产品名')),
('error', models.TextField(blank=True, verbose_name='错误摘要')),
('raw', models.JSONField(blank=True, default=dict, verbose_name='原始数据')),
('attempts', models.PositiveIntegerField(default=0, verbose_name='尝试次数')),
('last_attempt_at', models.DateTimeField(blank=True, null=True, verbose_name='最后尝试时间')),
],
options={
'verbose_name': '外部印染同步失败记录',
'verbose_name_plural': '外部印染同步失败记录',
'db_table': 'api_printing_external_sync_failure',
'ordering': ['-created_at'],
},
),
migrations.AddConstraint(
model_name='printingexternalsyncfailure',
constraint=models.UniqueConstraint(fields=('run_date', 'external_record_id'), name='uniq_printing_ext_sync_fail_run_date_record'),
),
migrations.AlterField(
model_name='datasync',
name='table_name',
field=models.CharField(choices=[('product', '产品'), ('customer', '客户'), ('plate_order', '开版(明道云)'), ('printing_external_record', '印染订单(外部 records'), ('mdy_plate_order_staging_tiia_upload', '开版暂存-腾讯图库上传')], max_length=50, verbose_name='同步目标'),
),
]