intent_org.py 685 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. from datetime import datetime
  4. from pydantic import ConfigDict
  5. from common.schema import SchemaBase
  6. class IntentOrgSchemaBase(SchemaBase):
  7. name: str
  8. api_key: str
  9. openai_base: str
  10. openai_key: str
  11. intent_callback: str
  12. status: int
  13. deleted_time: datetime | None = None
  14. class CreateIntentOrgParam(IntentOrgSchemaBase):
  15. pass
  16. class UpdateIntentOrgParam(IntentOrgSchemaBase):
  17. pass
  18. class GetIntentOrgListDetails(IntentOrgSchemaBase):
  19. model_config = ConfigDict(from_attributes=True)
  20. class CurrentIntentOrgIns(GetIntentOrgListDetails):
  21. id: int
  22. model_config = ConfigDict(from_attributes=True)