mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
perf: Assistant description
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user