perf: Assistant description

This commit is contained in:
fit2cloud-chenyw
2025-07-22 16:05:36 +08:00
parent bec910cc4c
commit a6360ac3e0
3 changed files with 27 additions and 0 deletions
@@ -0,0 +1,25 @@
"""032_modify_assistant_ddl
Revision ID: 6549e47f9adc
Revises: bd2ed188b5bd
Create Date: 2025-07-22 12:23:16.646665
"""
from alembic import op
import sqlalchemy as sa
import sqlmodel.sql.sqltypes
# revision identifiers, used by Alembic.
revision = '6549e47f9adc'
down_revision = 'bd2ed188b5bd'
branch_labels = None
depends_on = None
def upgrade():
op.add_column('sys_assistant', sa.Column('description', sa.Text(), nullable=True))
def downgrade():
op.drop_column('sys_assistant', 'description')
@@ -47,6 +47,7 @@ class AssistantBaseModel(SQLModel):
name: str = Field(max_length=255, nullable=False)
type: int = Field(nullable=False, default=0)
domain: str = Field(max_length=255, nullable=False)
description: str = Field(sa_type = Text(), nullable=True)
configuration: Optional[str] = Field(sa_type = Text(), nullable=True)
create_time: int = Field(default=0, sa_type=BigInteger())
@@ -68,6 +68,7 @@ class AssistantBase(BaseModel):
domain: str
type: int = 0
configuration: Optional[str] = None
description: Optional[str] = None
class AssistantDTO(AssistantBase, BaseCreatorDTO):
pass