# Generated by Django 5.2.11

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("system", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="ChunkUploadSession",
            fields=[
                ("id", models.BigAutoField(help_text="主键", primary_key=True, serialize=False, verbose_name="Id")),
                ("creator", models.CharField(blank=True, db_index=True, help_text="创建人", max_length=255, null=True, verbose_name="创建人")),
                ("modifier", models.CharField(blank=True, db_index=True, help_text="修改人", max_length=255, null=True, verbose_name="修改人")),
                ("dept_belong_id", models.CharField(blank=True, db_index=True, help_text="数据归属部门", max_length=255, null=True, verbose_name="数据归属部门")),
                ("update_datetime", models.DateTimeField(auto_now=True, db_index=True, help_text="修改时间", null=True, verbose_name="修改时间")),
                ("create_datetime", models.DateTimeField(auto_now_add=True, db_index=True, help_text="创建时间", null=True, verbose_name="创建时间")),
                ("description", models.TextField(blank=True, help_text="描述", null=True, verbose_name="描述")),
                ("upload_id", models.CharField(help_text="上传会话ID", max_length=64, unique=True, db_index=True, verbose_name="上传会话ID")),
                ("file_md5", models.CharField(help_text="文件MD5", max_length=32, db_index=True, verbose_name="文件MD5")),
                ("filename", models.CharField(blank=True, help_text="文件名", max_length=255, verbose_name="文件名")),
                ("total_size", models.BigIntegerField(default=0, help_text="文件总大小", verbose_name="文件总大小")),
                ("chunk_total", models.IntegerField(default=0, help_text="切片总数", verbose_name="切片总数")),
                (
                    "uploaded_chunk_indices",
                    models.JSONField(default=list, help_text="已上传的 chunk_index 列表，如 [0,1,2]", verbose_name="已上传切片序号"),
                ),
            ],
            options={
                "verbose_name": "切片上传会话",
                "verbose_name_plural": "切片上传会话",
                "db_table": "base_system_chunk_upload_session",
                "ordering": ("-create_datetime",),
            },
        ),
    ]
