Commit fd472c01 authored by 张会鑫's avatar 张会鑫

调整model

parent e85f3e8a
......@@ -33,7 +33,7 @@ from dbgpt.app.apps.system import crud as vadmin_system_crud
import copy
from dbgpt.app.apps.utils import status
from datetime import datetime
from dbgpt.app.apps.vadmin.media.models.media import VadminCorrelation
class UserDal(DalBase):
import_headers = [
......@@ -786,7 +786,7 @@ class KnowledgeDal(DalBase):
def __init__(self, db: AsyncSession):
super(KnowledgeDal, self).__init__()
self.db = db
self.model = models.KnowledgeDept
self.model = VadminCorrelation
self.schema = schemas.KnowledgeOut
# class TestDal(DalBase):
......
#!/usr/bin/python
# -*- coding: utf-8 -*-
# @version : 1.0
# @Create Time : 2023/10/23 13:41
# @File : dept.py
# @IDE : PyCharm
# @desc : 部门模型
from sqlalchemy.orm import Mapped, mapped_column
from dbgpt.app.apps.db.db_base import BaseModel
from sqlalchemy import String, Integer, ForeignKey
class KnowledgeDept(BaseModel):
__tablename__ = "knowledge_space"
__table_args__ = ({'comment': '知识库表'})
name: Mapped[str] = mapped_column(String(100), index=True, nullable=False, comment="名称")
# vector_type: Mapped[str] = mapped_column(String(50), nullable=False, comment="vector_type")
# domain_type: Mapped[str] = mapped_column(String(50), nullable=False, comment="domain_type")
# desc: Mapped[int | str] = mapped_column(String(500), nullable=False,comment="desc")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment