s_robot_dataset.go 895 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package schema
  2. // RobotDataset RobotDataset对象
  3. type RobotDataset struct {
  4. RecordID string `json:"record_id"` // 记录id
  5. RobotId string `json:"robot_id"` // 机器人id
  6. DatasetId string `json:"dataset_id"` // 知识库id
  7. }
  8. // RobotDatasetQueryParam 查询条件
  9. type RobotDatasetQueryParam struct {
  10. Code string
  11. Status int
  12. LikeCode string
  13. LikeName string
  14. RecordIDs []string
  15. }
  16. // RobotDatasetQueryOptions RobotDataset对象查询可选参数项
  17. type RobotDatasetQueryOptions struct {
  18. PageParam *PaginationParam // 分页参数
  19. }
  20. type RobotDatasets []*RobotDataset
  21. // RobotDatasetQueryResult RobotDataset对象查询结果
  22. type RobotDatasetQueryResult struct {
  23. Data []*RobotDataset
  24. PageResult *PaginationResult
  25. }
  26. func (a RobotDatasets) ToDatasetIds() []string {
  27. Ids := make([]string, len(a))
  28. for k, v := range a {
  29. Ids[k] = v.DatasetId
  30. }
  31. return Ids
  32. }