from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('api_v1', '0002_alter_uploadedfile_path'),
    ]

    operations = [
        migrations.CreateModel(
            name='DataSync',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('table_name', models.CharField(choices=[('product', '产品'), ('customer', '客户')], max_length=50, verbose_name='同步目标')),
                ('page_index', models.PositiveIntegerField(default=1, verbose_name='页码')),
                ('page_size', models.PositiveIntegerField(default=100, verbose_name='每页数量')),
                ('total_count', models.PositiveIntegerField(default=0, verbose_name='远端总数')),
                ('synced_rows', models.PositiveIntegerField(default=0, verbose_name='本次同步数量')),
                ('last_ctime', models.DateTimeField(blank=True, null=True, verbose_name='最新数据时间')),
                ('last_rowid', models.CharField(blank=True, max_length=64, verbose_name='最新 RowID')),
                ('note', models.CharField(blank=True, max_length=255, verbose_name='备注')),
            ],
            options={
                'verbose_name': '数据同步记录',
                'verbose_name_plural': '数据同步记录',
                'db_table': 'api_data_sync',
                'ordering': ['-created_at'],
            },
        ),
    ]
