Skip to content

Commit a6360ac

Browse files
perf: Assistant description
1 parent bec910c commit a6360ac

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""032_modify_assistant_ddl
2+
3+
Revision ID: 6549e47f9adc
4+
Revises: bd2ed188b5bd
5+
Create Date: 2025-07-22 12:23:16.646665
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
import sqlmodel.sql.sqltypes
11+
12+
13+
# revision identifiers, used by Alembic.
14+
revision = '6549e47f9adc'
15+
down_revision = 'bd2ed188b5bd'
16+
branch_labels = None
17+
depends_on = None
18+
19+
20+
def upgrade():
21+
op.add_column('sys_assistant', sa.Column('description', sa.Text(), nullable=True))
22+
23+
24+
def downgrade():
25+
op.drop_column('sys_assistant', 'description')

backend/apps/system/models/system_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class AssistantBaseModel(SQLModel):
4747
name: str = Field(max_length=255, nullable=False)
4848
type: int = Field(nullable=False, default=0)
4949
domain: str = Field(max_length=255, nullable=False)
50+
description: str = Field(sa_type = Text(), nullable=True)
5051
configuration: Optional[str] = Field(sa_type = Text(), nullable=True)
5152
create_time: int = Field(default=0, sa_type=BigInteger())
5253

backend/apps/system/schemas/system_schema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class AssistantBase(BaseModel):
6868
domain: str
6969
type: int = 0
7070
configuration: Optional[str] = None
71+
description: Optional[str] = None
7172
class AssistantDTO(AssistantBase, BaseCreatorDTO):
7273
pass
7374

0 commit comments

Comments
 (0)