| 1234567891011121314151617181920212223242526272829303132333435363738 |
- package schema
- // RobotDataset RobotDataset对象
- type RobotDataset struct {
- RecordID string `json:"record_id"` // 记录id
- RobotId string `json:"robot_id"` // 机器人id
- DatasetId string `json:"dataset_id"` // 知识库id
- }
- // RobotDatasetQueryParam 查询条件
- type RobotDatasetQueryParam struct {
- Code string
- Status int
- LikeCode string
- LikeName string
- RecordIDs []string
- }
- // RobotDatasetQueryOptions RobotDataset对象查询可选参数项
- type RobotDatasetQueryOptions struct {
- PageParam *PaginationParam // 分页参数
- }
- type RobotDatasets []*RobotDataset
- // RobotDatasetQueryResult RobotDataset对象查询结果
- type RobotDatasetQueryResult struct {
- Data []*RobotDataset
- PageResult *PaginationResult
- }
- func (a RobotDatasets) ToDatasetIds() []string {
- Ids := make([]string, len(a))
- for k, v := range a {
- Ids[k] = v.DatasetId
- }
- return Ids
- }
|