# Generated by Django 5.0.2 on 2024-08-26 08:49

import backend.models
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('backend', '0033_alter_file_location_alter_file_parent_id_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='DocumentKbm',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('create_time', models.DateTimeField(blank=True, default=backend.models.eight_hours_from_now, null=True, verbose_name='创建日期')),
                ('update_time', models.DateTimeField(default=backend.models.eight_hours_from_now, verbose_name='更新时间')),
                ('thumbnail', models.TextField(verbose_name='图片解析base64')),
                ('kb_id', models.CharField(max_length=255, verbose_name='知识库id')),
                ('parser_id', models.CharField(max_length=255, verbose_name='分析器id')),
                ('parser_config', models.CharField(max_length=255, verbose_name='分析器配置信息')),
                ('source_type', models.CharField(blank=True, default='local', max_length=255, null=True, verbose_name='属于分类')),
                ('type', models.CharField(max_length=255, verbose_name='文件类型')),
                ('created_by', models.CharField(blank=True, max_length=255, null=True, verbose_name='创建人id')),
                ('name', models.CharField(max_length=255, verbose_name='展示文件名称')),
                ('location', models.CharField(blank=True, max_length=255, null=True, verbose_name='原文件名称')),
                ('size', models.IntegerField(default=0, verbose_name='文件大小')),
                ('token_num', models.IntegerField(default=0, verbose_name='token数量')),
                ('chunk_num', models.IntegerField(default=0, verbose_name='分块数量')),
                ('progress', models.FloatField(default=0, verbose_name='解析数')),
                ('progress_msg', models.TextField(verbose_name='解析详情信息')),
                ('process_begin_at', models.DateTimeField(blank=True, null=True, verbose_name='解析开始时间')),
                ('process_duation', models.FloatField(default=0, verbose_name='解析时间记录')),
                ('run', models.CharField(default=0, max_length=255, verbose_name='解析标识')),
                ('status', models.SmallIntegerField(choices=[(5, '使用中'), (6, '已停用'), (4, '已删除')], default=5, verbose_name='状态')),
            ],
            options={
                'verbose_name': '上传文件详情表',
                'verbose_name_plural': '上传文件详情表',
                'db_table': 'kbm_document',
            },
        ),
        migrations.CreateModel(
            name='File2document',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('create_time', models.DateTimeField(blank=True, default=backend.models.eight_hours_from_now, null=True, verbose_name='创建日期')),
                ('update_time', models.DateTimeField(default=backend.models.eight_hours_from_now, verbose_name='更新时间')),
                ('file_id', models.CharField(max_length=255, verbose_name='文件fileid')),
                ('document_id', models.CharField(max_length=255, verbose_name='文件详情id')),
            ],
            options={
                'verbose_name': '文件位置关联表',
                'verbose_name_plural': '文件位置关联表',
                'db_table': 'kbm_file2document',
            },
        ),
        migrations.AlterField(
            model_name='file',
            name='size',
            field=models.IntegerField(default=0, verbose_name='文件大小'),
        ),
    ]
