1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- from datetime import datetime
- from pydantic import ConfigDict
- from common.schema import SchemaBase
- intent_status_map = {
- 1: "有意向",
- 2: "无法判定",
- 3: "在忙",
- 4: "无意向"
- }
- class IntentRecordsSchemaBase(SchemaBase):
- pass
- class GetIntentRecordsByIdParam(IntentRecordsSchemaBase):
- internal_id: str | None = None
- external_id: str | None = None
- org_id: int | None = 0
- class CreateIntentRecordsParam(IntentRecordsSchemaBase):
- id: str | None = 0
- external_id: str
- industry_type: int | None = 0
- chat_history: str
- manual_intent: int | None = None
- org_id: int | None = 0
- created_at: datetime | None = None
- updated_at: datetime | None = None
- class UpdateIntentRecordsParam(IntentRecordsSchemaBase):
- internal_id: str | None = None
- external_id: str | None = None
- manual_intent: int
- org_id: int | None = 0
- class GetIntentRecordsListDetails(IntentRecordsSchemaBase):
- model_config = ConfigDict(from_attributes=True)
- id: str
- created_at: datetime
- updated_at: datetime | None = None
- class GetIntentRecordsDetails(IntentRecordsSchemaBase):
- model_config = ConfigDict(from_attributes=True)
- id: str
- external_id: str
- chat_history: str
- org_id: int | None = 0
|