...
|
...
|
@@ -39,6 +39,7 @@ const ( |
|
|
ReviewStatusReturn = 2 //退回
|
|
|
ReviewStatusPass = 3 //通过
|
|
|
ReviewStatusSubmit = 4 //提交
|
|
|
ReviewStatusAuditg = 5 //审批中
|
|
|
)
|
|
|
|
|
|
//公开状态
|
...
|
...
|
@@ -48,7 +49,12 @@ const ( |
|
|
PublicToCompany = 2 //公司公开
|
|
|
)
|
|
|
|
|
|
/*Favorite */
|
|
|
const (
|
|
|
ChanceStatusDelete = 1 //删除
|
|
|
ChanceStatusClose = 2 //关闭
|
|
|
)
|
|
|
|
|
|
/*Favorite 我的收藏/点赞*/
|
|
|
type FavoriteRequest struct {
|
|
|
ObjectType int `json:"object_type" valid:"Required"` //收藏 点赞
|
|
|
ChanceType int `json:"chance_type" valid:"Required"`
|
...
|
...
|
@@ -61,29 +67,7 @@ type FavoriteResponse struct { |
|
|
Lists []*ChanceFavorite `json:"lists"`
|
|
|
}
|
|
|
|
|
|
type ChanceFavorite struct {
|
|
|
Id int64 `json:"id"`
|
|
|
Favorite interface{} `json:"favorite"`
|
|
|
}
|
|
|
|
|
|
type ChanceDetail struct {
|
|
|
Id int64 `json:"id"`
|
|
|
Provider *BaseUserInfo `json:"provider"`
|
|
|
IsCollect bool `json:"is_collect"`
|
|
|
IsZan bool `json:"is_zan"`
|
|
|
Content string `json:"content"`
|
|
|
ChanceType int `json:"chance_type"`
|
|
|
|
|
|
//图片
|
|
|
//视频
|
|
|
//语音
|
|
|
|
|
|
ViewTotal int `json:"view_total"`
|
|
|
CommentTotal int `json:"comment_total"`
|
|
|
ZanTotal int `json:"zan_total"`
|
|
|
}
|
|
|
|
|
|
/*SympathyAction */
|
|
|
/*SympathyAction 点赞,收藏*/
|
|
|
type SympathyActionRequest struct {
|
|
|
MarkType int `json:"mark_type" valid:"Required"` // 1.赞 2.收藏
|
|
|
SourceType int `json:"source_type" valid:"Required"` //protocol.SourceType //机会 评论
|
...
|
...
|
@@ -108,27 +92,7 @@ type TemplatesResponse struct { |
|
|
Templates []*Template `json:"list"`
|
|
|
}
|
|
|
|
|
|
//模板
|
|
|
type Template struct {
|
|
|
Id int64 `json:"id"`
|
|
|
Name string `json:"name"`
|
|
|
Doc string `json:"doc"`
|
|
|
Icon string `json:"icon"`
|
|
|
FormList []*Form `json:"formList"`
|
|
|
Link string `json:"link"` //示例
|
|
|
}
|
|
|
|
|
|
//表单
|
|
|
type Form struct {
|
|
|
Id int `json:"id"`
|
|
|
Label string `json:"label"`
|
|
|
InputType string `json:"inputType"`
|
|
|
SectionType int8 `json:"sectionType"`
|
|
|
Value string `json:"value"`
|
|
|
Required int8 `json:"required"`
|
|
|
}
|
|
|
|
|
|
/*ChanceExample*/
|
|
|
/*ChanceExample 机会示例*/
|
|
|
type ChanceExampleRequest struct {
|
|
|
TemplateId int `json:"templateId" valid:"Required"`
|
|
|
}
|
...
|
...
|
@@ -136,6 +100,7 @@ type ChanceExampleResponse struct { |
|
|
Content string `json:"content"`
|
|
|
}
|
|
|
|
|
|
/*提交机会*/
|
|
|
type ChanceSubmitRequest struct {
|
|
|
Id int64 `json:"id"` // = 0添加 >0 编辑
|
|
|
AuditTemplateId int64 `json:"auditTemplateId" valid:"Required"`
|
...
|
...
|
@@ -146,29 +111,9 @@ type ChanceSubmitRequest struct { |
|
|
Videos []Video `json:"videos"`
|
|
|
RelatedDepartment int64 `json:"relatedDepartments" valid:"Required"`
|
|
|
}
|
|
|
|
|
|
type ChanceSubmitResponse struct {
|
|
|
}
|
|
|
|
|
|
type Speech struct {
|
|
|
Path string `json:"path"`
|
|
|
Duration int `json:"duration"`
|
|
|
}
|
|
|
type Picture struct {
|
|
|
Path string `json:"path"`
|
|
|
W int `json:"w"`
|
|
|
H int `json:"h"`
|
|
|
}
|
|
|
type Video struct {
|
|
|
Path string `json:"path"`
|
|
|
Cover Cover `json:"cover"` //封面
|
|
|
Duration int `json:"duration"`
|
|
|
}
|
|
|
|
|
|
type AuditConfig struct {
|
|
|
NoApprover int8 `json:"no_approver"` //审核人空时:【1:自动通过】【2:转交给管理员】
|
|
|
}
|
|
|
|
|
|
/*ChanceStatistics 首页-机会池统计*/
|
|
|
type ChanceStatisticsRequest struct {
|
|
|
}
|
...
|
...
|
@@ -177,12 +122,6 @@ type ChanceStatisticsResponse struct { |
|
|
List []ChanceTotalItem `json:"list"`
|
|
|
}
|
|
|
|
|
|
type ChanceTotalItem struct {
|
|
|
Id int `json:"id"` //类型
|
|
|
Name string `json:"name"` //总数
|
|
|
Total int `json:"total"`
|
|
|
}
|
|
|
|
|
|
/*MyChance 我的机会*/
|
|
|
type MySubmitChanceRequest struct {
|
|
|
LastId int64 `json:"lastId"`
|
...
|
...
|
@@ -190,33 +129,29 @@ type MySubmitChanceRequest struct { |
|
|
ReviewStatus int8 `json:"reviewStatus"` //审核状态
|
|
|
}
|
|
|
type MySubmitChanceResponse struct {
|
|
|
List []ChanceItem `json:"list"`
|
|
|
List []CommonListItem `json:"list"`
|
|
|
Total int `json:"total"`
|
|
|
}
|
|
|
|
|
|
/*MyApproveChance 我审核的机会*/
|
|
|
type MyApproveChanceRequest struct {
|
|
|
/*ChancePool 机会池*/
|
|
|
type ChancePoolRequest struct {
|
|
|
LastId int64 `json:"lastId"`
|
|
|
PageSize int `json:"pageSize" valid:"Required"`
|
|
|
ReviewStatus int8 `json:"reviewStatus"` //审核状态
|
|
|
ChanceTypeId int `json:"chanceTypeId"` //0:所有机会 编号:对应机会类型编号的机会
|
|
|
}
|
|
|
type MyApproveChanceResponse struct {
|
|
|
type ChancePoolResponse struct {
|
|
|
List []CommonListItem `json:"list"`
|
|
|
Total int `json:"total"`
|
|
|
}
|
|
|
|
|
|
//机会列表 通用项
|
|
|
type CommonListItem struct {
|
|
|
Chance ChanceItem `json:"chance,omitempty"` //机会详情
|
|
|
ChanceData ChanceData `json:"chanceData,omitempty"` //机会数据(是否收藏/点赞 浏览数 点赞总数 评论数)
|
|
|
Approve Approve `json:"approve,omitempty"` //审核人 审核信息(时间)
|
|
|
ApproveData ApproveData `json:"ApproveData"` //审核数据(公开状态 评分)
|
|
|
Message interface{} `json:"message,omitempty"`
|
|
|
Comment interface{} `json:"comment,omitempty"`
|
|
|
ChanceStatus int `json:"chanceStatus,omitempty"` //1.删除 2.关闭
|
|
|
/*Permission 机会权限*/
|
|
|
type ChancePermissionRequest struct {
|
|
|
}
|
|
|
|
|
|
type ChanceData struct {
|
|
|
type ChancePermissionResponse struct {
|
|
|
EditScore int `json:"editScore"`
|
|
|
EditChance int `json:"editChance"`
|
|
|
EditPublic int `json:"editPublic"`
|
|
|
CloseChance int `json:"closeChance"`
|
|
|
}
|
|
|
|
|
|
//我的机会列表
|
...
|
...
|
@@ -228,49 +163,80 @@ type ChanceItemOrm struct { |
|
|
Images string `orm:"column(images)"`
|
|
|
Voices string `orm:"column(speechs)"`
|
|
|
Videos string `orm:"column(videos)"`
|
|
|
ReviewStatus int `orm:"column(review_status)"` //审核状态 1:待审核 2:被退回 3:已通过
|
|
|
|
|
|
ApproveData string `json:"approveData"` //审核数据
|
|
|
}
|
|
|
type ChanceItem struct {
|
|
|
Id int64 `json:"id"`
|
|
|
CreateTime int64 `json:"createTime"`
|
|
|
Provider *BaseUserInfo `json:"provider"`
|
|
|
FormList []*Form `json:"formList" valid:"Required"`
|
|
|
Speechs []Speech `json:"speechs"`
|
|
|
Pictures []Picture `json:"pictures"`
|
|
|
Videos []Video `json:"videos"`
|
|
|
|
|
|
/*MyApproveChance 我审核的机会*/
|
|
|
type MyApproveChanceRequest struct {
|
|
|
LastId int64 `json:"lastId"`
|
|
|
PageSize int `json:"pageSize" valid:"Required"`
|
|
|
ReviewStatus int8 `json:"reviewStatus"` //审核状态
|
|
|
}
|
|
|
type MyApproveChanceResponse struct {
|
|
|
List []CommonListItem `json:"list"`
|
|
|
Total int `json:"total"`
|
|
|
}
|
|
|
|
|
|
//我的审核机会列表
|
|
|
type ChanceApproveItemOrm struct {
|
|
|
ChanceUserId int64 `orm:"column(chance_user_id)"`
|
|
|
SourceContent string `orm:"column(source_content)"`
|
|
|
ChanceEnableStatus string `orm:"column(enable_status)"`
|
|
|
ChanceEnableStatus int `orm:"column(enable_status)"`
|
|
|
Images string `orm:"column(images)"`
|
|
|
Voices string `orm:"column(speechs)"`
|
|
|
Videos string `orm:"column(videos)"`
|
|
|
ReviewStatus int `orm:"column(review_status)"`
|
|
|
|
|
|
Id int64 `orm:"column(id)"` //审核id
|
|
|
ApproveTime time.Time `orm:"column(approve_time)"`
|
|
|
ApproveData string `orm:"column(approve_data)"`
|
|
|
ApproveMessage string `orm:"column(approve_message)"`
|
|
|
ApproveUserId int64 `orm:"column(uid)"`
|
|
|
ProcessCreateTime time.Time `orm:"column(process_create_time)"`
|
|
|
ChanceId int64 `orm:"column(chance_id)"` // 机会id
|
|
|
}
|
|
|
|
|
|
//机会池列表
|
|
|
type ChancePoolItemOrm struct {
|
|
|
Id int64 `orm:"column(id)"`
|
|
|
Uid int64 `orm:"column(user_id)"`
|
|
|
CreateTime time.Time `orm:"column(create_at)"`
|
|
|
SourceContent string `orm:"column(source_content)"`
|
|
|
Images string `orm:"column(images)"`
|
|
|
Voices string `orm:"column(speechs)"`
|
|
|
Videos string `orm:"column(videos)"`
|
|
|
ReviewStatus int `orm:"column(review_status)"` //审核状态 1:待审核 2:被退回 3:已通过
|
|
|
|
|
|
//ApproveData string `json:"approveData"` //审核数据
|
|
|
|
|
|
TemplateId int `orm:"column(audit_template_id)"`
|
|
|
ChanceTypeId int `orm:"column(chance_type_id)"`
|
|
|
CommentTotal int `orm:"column(comment_total)"`
|
|
|
ZanTotal int `orm:"column(zan_total)"`
|
|
|
ViewTotal int `orm:"column(view_total)"`
|
|
|
}
|
|
|
|
|
|
/*ChanceDetail 机会详情*/
|
|
|
type ChanceDetailRequest struct {
|
|
|
Id int64 `json:"id"` //机会编号
|
|
|
}
|
|
|
type ChanceDetailResponse struct {
|
|
|
ChanceDetail ChanceItem `json:"chanceDetail"`
|
|
|
ApproveData *ApproveData `json:"publicData"`
|
|
|
ChanceDetail ChanceItem `json:"chance"`
|
|
|
ChanceData interface{} `json:"chanceData,omitempty"` //机会数据(是否收藏/点赞 浏览数 点赞总数 评论数)ChanceData
|
|
|
ApproveData *ApproveData `json:"approveData"`
|
|
|
ApproveProcess []*ProcessItem `json:"approveProcess"`
|
|
|
ApproveAccess *ApproveAccess `json:"approveAccess"` //
|
|
|
ChanceType NameItem `json:"chanceType"` //机会类型
|
|
|
ChanceTemplate NameItem `json:"template"` //机会模板
|
|
|
ReviewStatus int `json:"review_status"` //审核状态 1:待审核 2:被退回 3:已通过
|
|
|
}
|
|
|
|
|
|
/*ChanceDelete 机会删除*/
|
|
|
type ChanceDeleteRequest struct {
|
|
|
Id int64 `json:"id"` //机会编号
|
|
|
}
|
|
|
type ChanceDeleteResponse struct {
|
|
|
type ChanceType struct {
|
|
|
Id int `json:"id"`
|
|
|
Name string `json:"name"`
|
|
|
Template
|
|
|
}
|
|
|
|
|
|
/*ChanceChangePublish 修改公开状态*/
|
...
|
...
|
@@ -296,3 +262,121 @@ type ChanceCalculateScoreRequest struct { |
|
|
type ChanceCalculateScoreResponse struct {
|
|
|
DiscoveryScore float64 `json:"discoveryScore"` //发现分
|
|
|
}
|
|
|
|
|
|
/*ChanceDelete 机会删除*/
|
|
|
type ChanceDeleteRequest struct {
|
|
|
Id int64 `json:"id"` //机会编号
|
|
|
}
|
|
|
type ChanceDeleteResponse struct {
|
|
|
}
|
|
|
|
|
|
type ChanceFavorite struct {
|
|
|
Id int64 `json:"id"`
|
|
|
Favorite interface{} `json:"favorite"`
|
|
|
}
|
|
|
|
|
|
//机会详情
|
|
|
type ChanceDetail struct {
|
|
|
Id int64 `json:"id"`
|
|
|
Provider *BaseUserInfo `json:"provider"`
|
|
|
IsCollect bool `json:"is_collect"`
|
|
|
IsZan bool `json:"is_zan"`
|
|
|
Content string `json:"content"`
|
|
|
ChanceType int `json:"chance_type"`
|
|
|
|
|
|
//图片
|
|
|
//视频
|
|
|
//语音
|
|
|
|
|
|
ViewTotal int `json:"view_total"`
|
|
|
CommentTotal int `json:"comment_total"`
|
|
|
ZanTotal int `json:"zan_total"`
|
|
|
}
|
|
|
|
|
|
//模板
|
|
|
type Template struct {
|
|
|
Id int64 `json:"id"`
|
|
|
Name string `json:"name"`
|
|
|
Doc string `json:"doc"`
|
|
|
Icon string `json:"icon"`
|
|
|
FormList []*Form `json:"formList"`
|
|
|
Link string `json:"link"` //示例
|
|
|
}
|
|
|
|
|
|
//表单
|
|
|
type Form struct {
|
|
|
Id int `json:"id"`
|
|
|
Label string `json:"label"`
|
|
|
InputType string `json:"inputType"`
|
|
|
SectionType int8 `json:"sectionType"`
|
|
|
Value string `json:"value"`
|
|
|
Required int8 `json:"required"`
|
|
|
}
|
|
|
|
|
|
//语音
|
|
|
type Speech struct {
|
|
|
Path string `json:"path"`
|
|
|
Duration int `json:"duration"`
|
|
|
}
|
|
|
|
|
|
//图片
|
|
|
type Picture struct {
|
|
|
Path string `json:"path"`
|
|
|
W int `json:"w"`
|
|
|
H int `json:"h"`
|
|
|
}
|
|
|
|
|
|
//视频
|
|
|
type Video struct {
|
|
|
Path string `json:"path"`
|
|
|
Cover Cover `json:"cover"` //封面
|
|
|
Duration int `json:"duration"`
|
|
|
}
|
|
|
|
|
|
//审批配置
|
|
|
type AuditConfig struct {
|
|
|
NoApprover int8 `json:"no_approver"` //审核人空时:【1:自动通过】【2:转交给管理员】
|
|
|
}
|
|
|
|
|
|
//机会池 - 统计
|
|
|
type ChanceTotalItem struct {
|
|
|
Id int `json:"id"` //类型
|
|
|
Name string `json:"name"` //总数
|
|
|
Total int `json:"total"`
|
|
|
}
|
|
|
|
|
|
//机会列表 通用项
|
|
|
type CommonListItem struct {
|
|
|
Chance ChanceItem `json:"chance,omitempty"` //机会详情
|
|
|
ChanceData interface{} `json:"chanceData,omitempty"` //机会数据(是否收藏/点赞 浏览数 点赞总数 评论数)ChanceData
|
|
|
Approve interface{} `json:"approve,omitempty"` //审核人 审核信息(时间) Approve
|
|
|
ApproveData interface{} `json:"approveData,omitempty"` //审核数据(公开状态 评分) ApproveData
|
|
|
Message interface{} `json:"message,omitempty"` //消息
|
|
|
Comment interface{} `json:"comment,omitempty"` //评论
|
|
|
ChanceStatus int `json:"chanceStatus"` //0:正常 1.删除 2.关闭
|
|
|
ReviewStatus int `json:"reviewStatus"` //审核状态
|
|
|
|
|
|
//我审核的-通过
|
|
|
Score interface{} `json:"score,omitempty"`
|
|
|
|
|
|
//模板
|
|
|
ChanceType interface{} `json:"chanceType,omitempty"` //机会类型
|
|
|
ChanceTemplate interface{} `json:"template,omitempty"` //机会模板
|
|
|
}
|
|
|
type ChanceItem struct {
|
|
|
Id int64 `json:"id"`
|
|
|
CreateTime int64 `json:"createTime"`
|
|
|
Provider *BaseUserInfo `json:"provider"`
|
|
|
FormList []*Form `json:"formList" valid:"Required"`
|
|
|
Speechs []Speech `json:"speechs"`
|
|
|
Pictures []Picture `json:"pictures"`
|
|
|
Videos []Video `json:"videos"`
|
|
|
}
|
|
|
type ChanceData struct {
|
|
|
ThumbsUpTotal int `json:"thumbsupTotal"` //点赞总数
|
|
|
CommentTotal int `json:"commentTotal"` //评论总数
|
|
|
PageViewTotal int `json:"pageView"` //评论总数
|
|
|
|
|
|
IsThumbsUp bool `json:"thumbsup"` //是否点赞 1 点赞, 0 没有点赞
|
|
|
IsCollect bool `json:"isCollect"` //是否收藏 1 是 0 否
|
|
|
} |
...
|
...
|
|