2026-09-23 22:05:00 +08:00
|
|
|
"""
|
|
|
|
|
Copyright 2024-2026 ReplyPier
|
|
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from app.database import Base
|
|
|
|
|
from .organization import Organization
|
|
|
|
|
from .user import User
|
|
|
|
|
from .fcm_token import FCMToken
|
|
|
|
|
from .auth_session import AuthSession
|
|
|
|
|
from .customer import Customer
|
|
|
|
|
from .role import Role
|
|
|
|
|
from .permission import Permission
|
|
|
|
|
from .ai_config import AIConfig, AIModelType
|
|
|
|
|
from .agent import Agent
|
|
|
|
|
from .knowledge_to_agent import KnowledgeToAgent
|
|
|
|
|
from .knowledge import Knowledge
|
|
|
|
|
from .chat_history import ChatHistory
|
|
|
|
|
from .session_to_agent import SessionToAgent, SessionStatus
|
|
|
|
|
from .rating import Rating
|
|
|
|
|
from app.models.jira import JiraToken
|
|
|
|
|
from app.models.shopify import ShopifyShop
|
|
|
|
|
from app.models.workflow import Workflow
|
|
|
|
|
from app.models.workflow_node import WorkflowNode, ExitCondition
|
|
|
|
|
from app.models.workflow_connection import WorkflowConnection
|
|
|
|
|
from app.models.mcp_tool import MCPTool, MCPToolToAgent, MCPTransportType
|
|
|
|
|
from app.models.file_attachment import FileAttachment
|
|
|
|
|
from app.models.customer import LeadStage
|
|
|
|
|
from app.models.lead_capture import (
|
|
|
|
|
LeadCaptureConfig, LeadCaptureResponse,
|
|
|
|
|
LeadAssignmentMode, CrmSyncTarget,
|
|
|
|
|
)
|
|
|
|
|
from app.models.channels import (
|
|
|
|
|
ChannelAccount, ChannelType, ChannelConversation, AgentChannelConfig,
|
|
|
|
|
)
|
|
|
|
|
from app.models.faq_generation_job import (
|
|
|
|
|
FAQGenerationJob, FAQJobType, FAQJobStatus, FAQJobStage,
|
|
|
|
|
)
|
|
|
|
|
from app.models.faq import FAQ, FAQStatus
|
|
|
|
|
from app.models.help_center import (
|
|
|
|
|
HelpCenterSettings, HelpCenterQuery, DomainStatus, SSLStatus,
|
|
|
|
|
)
|
|
|
|
|
from app.models.ticket import (
|
|
|
|
|
Ticket, TicketSequence, TicketSession,
|
|
|
|
|
TicketStatus, TicketPriority, TicketSource, ResolutionOutcome,
|
|
|
|
|
)
|
|
|
|
|
from app.models.ticket_activity import TicketActivity, TicketActivityType, TicketActorType
|
|
|
|
|
from app.models.ticket_settings import OrganizationTicketSettings
|
|
|
|
|
from app.models.investigation import (
|
|
|
|
|
InvestigationRun, InvestigationRunType, InvestigationRunStatus, InvestigationTrigger,
|
|
|
|
|
InvestigationHypothesis, InvestigationEvent, RCADocument, TicketProposal,
|
|
|
|
|
)
|
|
|
|
|
from app.models.ticket_db_connector import TicketDBConnector, DBConnectorAuditLog
|
|
|
|
|
from app.models.crm import (
|
|
|
|
|
CrmConnection, CrmSyncJob, CrmCustomerSync,
|
|
|
|
|
CrmProvider, CrmConnectionStatus, CrmSyncJobStatus,
|
|
|
|
|
)
|
|
|
|
|
from app.models.notification_settings import UserNotificationSettings
|
|
|
|
|
from app.models.guardrail_event import GuardrailEvent
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# This ensures all models are imported in the correct order
|
|
|
|
|
__all__ = [
|
2026-10-29 09:46:21 +08:00
|
|
|
"Base",
|
2026-09-23 22:05:00 +08:00
|
|
|
"Organization",
|
|
|
|
|
"User",
|
|
|
|
|
"FCMToken",
|
|
|
|
|
"AuthSession",
|
|
|
|
|
"Customer",
|
|
|
|
|
"Permission",
|
|
|
|
|
"Role",
|
|
|
|
|
"AIConfig",
|
|
|
|
|
"AIModelType",
|
|
|
|
|
"Agent",
|
|
|
|
|
"KnowledgeToAgent",
|
|
|
|
|
"Knowledge",
|
|
|
|
|
"ChatHistory",
|
|
|
|
|
"SessionToAgent",
|
|
|
|
|
"SessionStatus",
|
|
|
|
|
"Rating",
|
|
|
|
|
"JiraToken",
|
|
|
|
|
"ShopifyShop",
|
|
|
|
|
"Workflow",
|
|
|
|
|
"WorkflowNode",
|
|
|
|
|
"ExitCondition",
|
|
|
|
|
"WorkflowConnection",
|
|
|
|
|
"MCPTool",
|
|
|
|
|
"MCPToolToAgent",
|
|
|
|
|
"MCPTransportType",
|
|
|
|
|
"FileAttachment",
|
|
|
|
|
"LeadStage",
|
|
|
|
|
"LeadCaptureConfig",
|
|
|
|
|
"LeadCaptureResponse",
|
|
|
|
|
"LeadAssignmentMode",
|
|
|
|
|
"CrmSyncTarget",
|
|
|
|
|
"ChannelAccount",
|
|
|
|
|
"ChannelType",
|
|
|
|
|
"ChannelConversation",
|
|
|
|
|
"AgentChannelConfig",
|
|
|
|
|
"FAQGenerationJob",
|
|
|
|
|
"FAQJobType",
|
|
|
|
|
"FAQJobStatus",
|
|
|
|
|
"FAQJobStage",
|
|
|
|
|
"FAQ",
|
|
|
|
|
"FAQStatus",
|
|
|
|
|
"HelpCenterSettings",
|
|
|
|
|
"HelpCenterQuery",
|
|
|
|
|
"DomainStatus",
|
|
|
|
|
"SSLStatus",
|
|
|
|
|
"Ticket",
|
|
|
|
|
"TicketSequence",
|
|
|
|
|
"TicketSession",
|
|
|
|
|
"TicketStatus",
|
|
|
|
|
"TicketPriority",
|
|
|
|
|
"TicketSource",
|
|
|
|
|
"ResolutionOutcome",
|
|
|
|
|
"TicketActivity",
|
|
|
|
|
"TicketActivityType",
|
|
|
|
|
"TicketActorType",
|
|
|
|
|
"OrganizationTicketSettings",
|
|
|
|
|
"UserNotificationSettings",
|
|
|
|
|
"InvestigationRun",
|
|
|
|
|
"InvestigationRunType",
|
|
|
|
|
"InvestigationRunStatus",
|
|
|
|
|
"InvestigationTrigger",
|
|
|
|
|
"InvestigationHypothesis",
|
|
|
|
|
"InvestigationEvent",
|
|
|
|
|
"RCADocument",
|
|
|
|
|
"TicketProposal",
|
|
|
|
|
"TicketDBConnector",
|
|
|
|
|
"DBConnectorAuditLog",
|
|
|
|
|
"CrmConnection",
|
|
|
|
|
"CrmSyncJob",
|
|
|
|
|
"CrmCustomerSync",
|
|
|
|
|
"CrmProvider",
|
|
|
|
|
"CrmConnectionStatus",
|
|
|
|
|
"CrmSyncJobStatus",
|
|
|
|
|
"GuardrailEvent",
|
|
|
|
|
]
|