11# Generated by Django 5.2 on 2025-06-04 11:57
22
3- import application . models . application_chat
4- import common . encoder . encoder
3+ import uuid
4+
55import django .contrib .postgres .fields
66import django .db .models .deletion
7- import uuid
87import uuid_utils .compat
98from django .db import migrations , models
109
10+ import common .encoder .encoder
1111
12- class Migration (migrations .Migration ):
1312
13+ class Migration (migrations .Migration ):
1414 dependencies = [
1515 ('application' , '0001_initial' ),
1616 ]
@@ -21,12 +21,13 @@ class Migration(migrations.Migration):
2121 fields = [
2222 ('create_time' , models .DateTimeField (auto_now_add = True , verbose_name = '创建时间' )),
2323 ('update_time' , models .DateTimeField (auto_now = True , verbose_name = '修改时间' )),
24- ('id' , models .UUIDField (default = uuid .UUID ('01973acd-fe4c-7fd1-94a8-f7cd668de562' ), editable = False , primary_key = True , serialize = False , verbose_name = '主键id' )),
24+ ('id' , models .UUIDField (default = uuid .UUID ('01973acd-fe4c-7fd1-94a8-f7cd668de562' ), editable = False ,
25+ primary_key = True , serialize = False , verbose_name = '主键id' )),
2526 ('abstract' , models .CharField (max_length = 1024 , verbose_name = '摘要' )),
26- ('asker' , models .JSONField (default = application .models .application_chat .default_asker , encoder = common .encoder .encoder .SystemEncoder , verbose_name = '访问者' )),
2727 ('client_id' , models .UUIDField (default = None , null = True , verbose_name = '客户端id' )),
2828 ('is_deleted' , models .BooleanField (default = False , verbose_name = '' )),
29- ('application' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'application.application' )),
29+ ('application' ,
30+ models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'application.application' )),
3031 ],
3132 options = {
3233 'db_table' : 'application_chat' ,
@@ -37,16 +38,25 @@ class Migration(migrations.Migration):
3738 fields = [
3839 ('create_time' , models .DateTimeField (auto_now_add = True , verbose_name = '创建时间' )),
3940 ('update_time' , models .DateTimeField (auto_now = True , verbose_name = '修改时间' )),
40- ('id' , models .UUIDField (default = uuid_utils .compat .uuid1 , editable = False , primary_key = True , serialize = False , verbose_name = '主键id' )),
41- ('vote_status' , models .CharField (choices = [('-1' , '未投票' ), ('0' , '赞同' ), ('1' , '反对' )], default = '-1' , max_length = 10 , verbose_name = '投票' )),
41+ ('id' ,
42+ models .UUIDField (default = uuid_utils .compat .uuid1 , editable = False , primary_key = True , serialize = False ,
43+ verbose_name = '主键id' )),
44+ ('vote_status' ,
45+ models .CharField (choices = [('-1' , '未投票' ), ('0' , '赞同' ), ('1' , '反对' )], default = '-1' , max_length = 10 ,
46+ verbose_name = '投票' )),
4247 ('problem_text' , models .CharField (max_length = 10240 , verbose_name = '问题' )),
4348 ('answer_text' , models .CharField (max_length = 40960 , verbose_name = '答案' )),
44- ('answer_text_list' , django .contrib .postgres .fields .ArrayField (base_field = models .JSONField (), default = list , size = None , verbose_name = '改进标注列表' )),
49+ ('answer_text_list' ,
50+ django .contrib .postgres .fields .ArrayField (base_field = models .JSONField (), default = list , size = None ,
51+ verbose_name = '改进标注列表' )),
4552 ('message_tokens' , models .IntegerField (default = 0 , verbose_name = '请求token数量' )),
4653 ('answer_tokens' , models .IntegerField (default = 0 , verbose_name = '响应token数量' )),
4754 ('const' , models .IntegerField (default = 0 , verbose_name = '总费用' )),
48- ('details' , models .JSONField (default = dict , encoder = common .encoder .encoder .SystemEncoder , verbose_name = '对话详情' )),
49- ('improve_paragraph_id_list' , django .contrib .postgres .fields .ArrayField (base_field = models .UUIDField (blank = True ), default = list , size = None , verbose_name = '改进标注列表' )),
55+ ('details' ,
56+ models .JSONField (default = dict , encoder = common .encoder .encoder .SystemEncoder , verbose_name = '对话详情' )),
57+ ('improve_paragraph_id_list' ,
58+ django .contrib .postgres .fields .ArrayField (base_field = models .UUIDField (blank = True ), default = list ,
59+ size = None , verbose_name = '改进标注列表' )),
5060 ('run_time' , models .FloatField (default = 0 , verbose_name = '运行时长' )),
5161 ('index' , models .IntegerField (verbose_name = '对话下标' )),
5262 ('chat' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'application.chat' )),
@@ -60,13 +70,17 @@ class Migration(migrations.Migration):
6070 fields = [
6171 ('create_time' , models .DateTimeField (auto_now_add = True , verbose_name = '创建时间' )),
6272 ('update_time' , models .DateTimeField (auto_now = True , verbose_name = '修改时间' )),
63- ('id' , models .UUIDField (default = uuid_utils .compat .uuid1 , editable = False , primary_key = True , serialize = False , verbose_name = '主键id' )),
64- ('workspace_id' , models .CharField (db_index = True , default = 'default' , max_length = 64 , verbose_name = '工作空间id' )),
73+ ('id' ,
74+ models .UUIDField (default = uuid_utils .compat .uuid1 , editable = False , primary_key = True , serialize = False ,
75+ verbose_name = '主键id' )),
76+ ('workspace_id' ,
77+ models .CharField (db_index = True , default = 'default' , max_length = 64 , verbose_name = '工作空间id' )),
6578 ('name' , models .CharField (default = '' , max_length = 128 , verbose_name = '版本名称' )),
6679 ('publish_user_id' , models .UUIDField (default = None , null = True , verbose_name = '发布者id' )),
6780 ('publish_user_name' , models .CharField (default = '' , max_length = 128 , verbose_name = '发布者名称' )),
6881 ('work_flow' , models .JSONField (default = dict , verbose_name = '工作流数据' )),
69- ('application' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'application.application' )),
82+ ('application' ,
83+ models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'application.application' )),
7084 ],
7185 options = {
7286 'db_table' : 'application_work_flow_version' ,
@@ -77,16 +91,20 @@ class Migration(migrations.Migration):
7791 fields = [
7892 ('create_time' , models .DateTimeField (auto_now_add = True , verbose_name = '创建时间' )),
7993 ('update_time' , models .DateTimeField (auto_now = True , verbose_name = '修改时间' )),
80- ('id' , models .UUIDField (default = uuid .uuid1 , editable = False , primary_key = True , serialize = False , verbose_name = '主键id' )),
94+ ('id' , models .UUIDField (default = uuid .uuid1 , editable = False , primary_key = True , serialize = False ,
95+ verbose_name = '主键id' )),
8196 ('client_id' , models .UUIDField (default = uuid .uuid1 , verbose_name = '公共访问链接客户端id' )),
8297 ('client_type' , models .CharField (max_length = 64 , verbose_name = '客户端类型' )),
8398 ('access_num' , models .IntegerField (default = 0 , verbose_name = '访问总次数次数' )),
8499 ('intraday_access_num' , models .IntegerField (default = 0 , verbose_name = '当日访问次数' )),
85- ('application' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'application.application' , verbose_name = '应用id' )),
100+ ('application' ,
101+ models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'application.application' ,
102+ verbose_name = '应用id' )),
86103 ],
87104 options = {
88105 'db_table' : 'application_public_access_client' ,
89- 'indexes' : [models .Index (fields = ['application_id' , 'client_id' ], name = 'application_applica_8aaf45_idx' )],
106+ 'indexes' : [
107+ models .Index (fields = ['application_id' , 'client_id' ], name = 'application_applica_8aaf45_idx' )],
90108 },
91109 ),
92110 ]
0 commit comments