feat(agent):change orm default value

This commit is contained in:
yhjun1026
2025-05-07 10:27:49 +08:00
parent 9b9dd30a6e
commit 3d82a1b52f
2 changed files with 6 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ class GptsMessagesEntity(Model):
String(255), nullable=False, comment="The unique id of the conversation record" String(255), nullable=False, comment="The unique id of the conversation record"
) )
message_id = Column( message_id = Column(
String(255), nullable=False, comment="The unique id of the messages" String(255), nullable=False, comment="The unique id of the messages", default=""
) )
sender = Column( sender = Column(
String(255), String(255),
@@ -37,6 +37,7 @@ class GptsMessagesEntity(Model):
sender_name = Column( sender_name = Column(
String(255), String(255),
nullable=False, nullable=False,
default = "",
comment="Who(name) speaking in the current conversation turn", comment="Who(name) speaking in the current conversation turn",
) )
receiver = Column( receiver = Column(
@@ -47,6 +48,7 @@ class GptsMessagesEntity(Model):
receiver_name = Column( receiver_name = Column(
String(255), String(255),
nullable=False, nullable=False,
default="",
comment="Who(name) receive message in the current conversation turn", comment="Who(name) receive message in the current conversation turn",
) )
model_name = Column(String(255), nullable=True, comment="message generate model") model_name = Column(String(255), nullable=True, comment="message generate model")

View File

@@ -14,12 +14,12 @@ class GptsPlansEntity(Model):
conv_id = Column( conv_id = Column(
String(255), nullable=False, comment="The unique id of the conversation record" String(255), nullable=False, comment="The unique id of the conversation record"
) )
task_uid = Column(String(255), nullable=False, comment="The uid of the plan task") task_uid = Column(String(255), nullable=False, default='', comment="The uid of the plan task")
sub_task_num = Column(Integer, nullable=False, comment="Subtask id") sub_task_num = Column(Integer, nullable=False, comment="Subtask id")
conv_round = Column(Integer, nullable=False, comment="The dialogue turns") conv_round = Column(Integer, nullable=False, default=0, comment="The dialogue turns")
conv_round_id = Column(String(255), nullable=True, comment="The dialogue turns uid") conv_round_id = Column(String(255), nullable=True, comment="The dialogue turns uid")
sub_task_id = Column(String(255), nullable=False, comment="Subtask id") sub_task_id = Column(String(255), nullable=False, default='', comment="Subtask id")
task_parent = Column(String(255), nullable=True, comment="Subtask parent task id") task_parent = Column(String(255), nullable=True, comment="Subtask parent task id")
sub_task_title = Column(String(255), nullable=False, comment="subtask title") sub_task_title = Column(String(255), nullable=False, comment="subtask title")
sub_task_content = Column(Text, nullable=False, comment="subtask content") sub_task_content = Column(Text, nullable=False, comment="subtask content")