package schema import "time" // RobotConfig RobotConfig对象 type RobotConfig struct { RecordID string `json:"record_id"` // 记录id OrgId string `json:"org_id"` // 组织机构id OrgName string `json:"org_name"` // 组织机构名称 Name string `json:"name"` // 机器人名称 Type int `json:"type"` // 机器人类型 1钉钉机器人 2 其他机器人 ReplyType int `json:"reply_type"` // 钉钉机器人回复类型 1: 文本回复 2: 卡片回复 APPID string `json:"app_id"` // APP ID ClientId string `json:"client_id"` // 客户端ID ClientSecret string `json:"client_secret"` // 客户端密钥 Webhook string `json:"webhook"` // 消息接收WebHook CardTemplateId string `json:"card_template_id"` // 卡片模板ID AssistantId string `json:"assistant_id"` // 助手id SessionId string `json:"session_id"` // 会话id CreatedAt time.Time `json:"created_at"` // 创建时间 CreatorId string `json:"creator_id"` // 创建者 CreatorName string `json:"creator_name"` // 创建者名称 Datasets Datasets `json:"datasets"` // 关联知识库 } // RobotConfigQueryParam 查询条件 type RobotConfigQueryParam struct { RecordIDs []string OrgId string UserId string ReplyType int // 回复类型 1: 文本回复 2: 卡片回复 } // RobotConfigQueryOptions RobotConfig对象查询可选参数项 type RobotConfigQueryOptions struct { PageParam *PaginationParam // 分页参数 } type RobotConfigs []*RobotConfig // RobotConfigQueryResult RobotConfig对象查询结果 type RobotConfigQueryResult struct { Data RobotConfigs PageResult *PaginationResult } // FillCreator 填充创建者信息 func (a RobotConfigs) FillCreator(users Users) { for _, r := range a { for _, u := range users { if r.CreatorId == u.RecordID { r.CreatorName = u.RealName continue } } } }