feat(shipping-notice): 添加订单抽取功能,支持异步运行和管理,优化相关数据模型和处理逻辑

This commit is contained in:
hugo committed 2026-07-21 09:02:42 +08:00
1 parent 34d489a2d1
commit ce26d6d0c4
144 files changed
+12241 -4233

No files matched your search

+8 -1
View File
@@ -11,7 +11,7 @@ from __future__ import annotations
from datetime import datetime
from typing import List, Optional
from sqlalchemy import Boolean, DateTime, ForeignKey, Integer, JSON, String, Text, UniqueConstraint
from sqlalchemy import Boolean, CheckConstraint, DateTime, ForeignKey, Integer, JSON, String, Text, UniqueConstraint
from sqlalchemy.orm import Mapped, mapped_column, relationship
from app.models.base import Base, user_agent_permissions
@@ -25,6 +25,12 @@ class Agent(Base):
"""
__tablename__ = 'agents'
__table_args__ = (
CheckConstraint(
"exposure_mode IN ('workspace', 'internal')",
name='ck_agents_exposure_mode',
),
)
id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str] = mapped_column(String(100))
@@ -44,6 +50,7 @@ class Agent(Base):
runtime_provider: Mapped[str] = mapped_column(String(32), default='dify', nullable=False)
conversation_mode: Mapped[str] = mapped_column(String(32), default='chat', nullable=False)
dify_app_type: Mapped[str] = mapped_column(String(20), default='chatflow', nullable=False)
exposure_mode: Mapped[str] = mapped_column(String(20), default='workspace', nullable=False)
iframe_url: Mapped[Optional[str]] = mapped_column(String(500), nullable=True)
category: Mapped[Optional[str]] = mapped_column(String(64), nullable=True)
sub_category: Mapped[Optional[str]] = mapped_column(String(64), nullable=True)