form_records.py 760 B

123456789101112131415161718192021222324252627282930
  1. from common.schema import SchemaBase
  2. from datetime import datetime
  3. class FormRecordsSchemaBase(SchemaBase):
  4. pass
  5. class FormFieldOptions(FormRecordsSchemaBase):
  6. value: str
  7. label: str
  8. children: list['FormFieldOptions'] | None = None
  9. class FormFieldProps(FormRecordsSchemaBase):
  10. options: list[FormFieldOptions]
  11. class FormData(FormRecordsSchemaBase):
  12. valueType: str
  13. title: str
  14. dataIndex: str
  15. fieldProps: FormFieldProps | None = None
  16. class CreateFormRecordsParam(FormRecordsSchemaBase):
  17. id: str | None = 0
  18. external_id: str
  19. chat_history: str
  20. form_data: list[FormData]
  21. form_value: list | None = None
  22. org_id: int | None = 0
  23. created_at: datetime | None = None
  24. updated_at: datetime | None = None