Files
effekt-interface/app/api/model/documentSourceModel.py
qiaoxinjiu 420b9e37fa feat: 新增文档源和技能管理相关功能
1. 新增文档源管理模块(documentSource)
   - 控制器:documentSourceController.py
   - DAO层:documentSourceDao.py
   - 模型:documentSourceModel.py
   - 服务层:documentSourceService.py

2. 新增技能管理模块(skill)
   - 控制器:skillController.py
   - DAO层:skillDao.py
   - 模型:skillModel.py
   - 服务层:skillService.py

3. 新增AI服务(aiService.py)

4. 新增配置文件
   - AI配置:config/ai_config.py
   - 技能配置:config/skills/test-case-generator/

5. 新增SQL脚本
   - 文档权限:add_document_permissions.sql
   - 模块状态字段:add_module_status_field.sql
   - 文档源表:create_document_source_table.sql
   - 技能规则:skills_rules_pgsql.sql
2026-05-18 10:23:07 +08:00

27 lines
1.4 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# encoding: UTF-8
from sqlalchemy import BigInteger, Column, Integer, SmallInteger, String, TIMESTAMP, Text, text
from sqlalchemy.ext.declarative import declarative_base
from common.sqlSession import to_dict
Base = declarative_base()
Base.to_dict = to_dict
class DocumentSource(Base):
__tablename__ = 'document_source'
id = Column(BigInteger, primary_key=True, autoincrement=True, comment='主键ID')
product_id = Column(BigInteger, nullable=False, comment='产品ID')
project_id = Column(BigInteger, nullable=False, comment='项目ID')
type = Column(SmallInteger, default=1, comment='类型1-PDF文件2-飞书链接')
source = Column(String(512), nullable=False, comment='文件路径或飞书链接')
content = Column(Text, comment='解析后的文本内容(缓存)')
version = Column(Integer, default=1, comment='版本号')
status = Column(SmallInteger, default=0, comment='状态0-待解析1-已解析2-已生成用例')
ai_model = Column(String(64), comment='使用的AI模型')
created_by = Column(BigInteger, comment='创建人ID')
is_delete = Column(Integer, default=0, comment='0未删除1已删除')
created_time = Column(TIMESTAMP, server_default=text('CURRENT_TIMESTAMP'), comment='创建时间')
updated_time = Column(TIMESTAMP, server_default=text('CURRENT_TIMESTAMP'), server_onupdate=text('CURRENT_TIMESTAMP'), comment='更新时间')