123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- import "../base.api"
- import "./work_experience.api"
- import "./tutorial.api"
- import "./employee_config.api"
- type (
- // The data of employee information | Employee信息
- EmployeeInfo {
- BaseIDInfo
- // title | 标题
- Title *string `json:"title,optional"`
- // avatar | 头像
- Avatar *string `json:"avatar,optional"`
- // tags | 个人标签
- Tags *string `json:"tags,optional"`
- // hire_count | 被雇佣次数
- HireCount *int `json:"hireCount,optional"`
- // service_count | 已服务次数
- ServiceCount *int `json:"serviceCount,optional"`
- // achievement_count | 业绩单数
- AchievementCount *int `json:"achievementCount,optional"`
- // category_id | 分类ID
- CategoryId *uint64 `json:"categoryId,optional"`
- // intro | 个人介绍
- Intro *string `json:"intro,optional"`
- // estimate | 自我评价
- Estimate *string `json:"estimate,optional"`
- // skill | 技能卡
- Skill *string `json:"skill,optional"`
- // ability_type | 能力类型
- AbilityType *string `json:"abilityType,optional"`
- // scene | 使用场景
- Scene *string `json:"scene,optional"`
- SceneList []EmployeeConfigInfo `json:"sceneList,optional"`
- // switch_in | 支持介入
- SwitchIn *string `json:"switchIn,optional"`
- SwitchInList []EmployeeConfigInfo `json:"switchInList,optional"`
- Tutorial []TutorialInfo `json:"tutorial,optional"`
- // video_url | 视频地址
- VideoUrl *string `json:"videoUrl,optional"`
- // work_experience | 工作经验
- WorkExperience []WorkExperienceInfo `json:"workExperience,optional"`
- ApiBase *string `json:"apiBase,optional"`
- ApiKey *string `json:"apiKey,optional"`
- // AI信息
- AiInfo *string `json:"aiInfo,optional"`
- ShowChat *bool `json:"showChat,optional"`
- IsVip *bool `json:"isVip,optional"`
-
- ChatUrl *string `json:"chatUrl,optional"`
- }
- // The response data of employee list | Employee列表数据
- EmployeeListResp {
- BaseDataInfo
- // Employee list data | Employee列表数据
- Data EmployeeListInfo `json:"data"`
- }
- // Employee list data | Employee列表数据
- EmployeeListInfo {
- BaseListInfo
- // The API list data | Employee列表数据
- Data []EmployeeInfo `json:"data"`
- }
- // Get employee list request params | Employee列表请求参数
- EmployeeListReq {
- PageInfo
- // title | 标题
- Title *string `json:"title,optional"`
- // tags | 个人标签
- Tags *string `json:"tags,optional"`
- // category_id | 分类ID
- CategoryId *uint64 `json:"categoryId,optional"`
- }
- // Employee information response | Employee信息返回体
- EmployeeInfoResp {
- BaseDataInfo
- // Employee information | Employee数据
- Data EmployeeInfo `json:"data"`
- }
- AuthReq {
- Token *string `json:"token,optional"`
- Data uint64 `json:"data,optional"`
- }
- AuthResp {
- Token *string `json:"token,optional"`
- Data *uint64 `json:"data,optional"`
- Original interface{} `json:"original,optional"`
- OK interface{} `json:"ok,optional"`
- SecretKey string `json:"secretKey,optional"`
- }
- )
- @server(
- group: employee
- )
- service Wechat {
- // Get employee list | 获取Employee列表
- @handler getApiEmployeeList
- post /api/employee/list (EmployeeListReq) returns (EmployeeListResp)
- // Get employee by ID | 通过ID获取Employee
- @handler getApiEmployeeDetail
- post /api/employee/detail (IDReq) returns (EmployeeInfoResp)
- }
- @server(
- group: employee
- )
- service Wechat {
- // Get employee list | 获取Employee列表
- @handler getEmployeeSearch
- post /employee/search (EmployeeListReq) returns (EmployeeListResp)
- // Get employee list | 获取Employee列表
- @handler getEmployeeSearchTest
- post /employee/search/test (AuthReq) returns (AuthResp)
- // Get employee by ID | 通过ID获取Employee
- @handler getEmployeeDetail
- post /employee/detail (IDReq) returns (EmployeeInfoResp)
- }
- @server(
- jwt: Auth
- group: employee
- middleware: Authority
- )
- service Wechat {
- // Create employee information | 创建Employee
- @handler createEmployee
- post /employee/create (EmployeeInfo) returns (BaseMsgResp)
- // Update employee information | 更新Employee
- @handler updateEmployee
- post /employee/update (EmployeeInfo) returns (BaseMsgResp)
- // Delete employee information | 删除Employee信息
- @handler deleteEmployee
- post /employee/delete (IDsReq) returns (BaseMsgResp)
- // Get employee list | 获取Employee列表
- @handler getEmployeeList
- post /employee/list (EmployeeListReq) returns (EmployeeListResp)
- // Get employee by ID | 通过ID获取Employee
- @handler getEmployeeById
- post /employee (IDReq) returns (EmployeeInfoResp)
- }
|