|
|
syntax = "v1"
|
|
|
|
|
|
// 坐标地点描述
|
|
|
type Location {
|
|
|
Longitude float64 `json:"longitude,optional"` //经度
|
|
|
Latitude float64 `json:"latitude,optional"` //纬度
|
|
|
Descript string `json:"descript,optional"` //地点描述
|
|
|
}
|
|
|
|
|
|
// 人员的简单展示信息
|
|
|
type Author {
|
|
|
Id int64 `json:"id"` // 人员id
|
|
|
Name string `json:"name"` // 人员的名字
|
|
|
Avatar string `json:"avatar"` // 人员头像URL
|
|
|
Group string `json:"group"` // 人员的分组
|
|
|
Position string `json:"position"` // 职位
|
|
|
Company string `json:"company"` // 公司
|
|
|
}
|
|
|
|
|
|
//小程序端创建发布文章
|
|
|
type (
|
|
|
MiniArticleCreateRequest {
|
|
|
Title string `json:"title"` //标题
|
|
|
Section []string `json:"section"` //文章的文本内容
|
|
|
AuthorId int64 `json:"authorId,optional"` //发布人id
|
|
|
Images []string `json:"images,optional"` //图片
|
|
|
WhoRead []int64 `json:"whoRead,optional"` //谁可查看
|
|
|
WhoReview []int64 `json:"whoReview,optional"` //谁可评论
|
|
|
Location Location `json:"location,optional"` //定位坐标
|
|
|
}
|
|
|
MiniArticleCreateResponse {
|
|
|
Id int64 `json:"id"`
|
|
|
}
|
|
|
)
|
|
|
|
|
|
//小程序端查看文章的详情
|
|
|
type (
|
|
|
MiniArticleGetRequest {
|
|
|
Id int64 `path:"id"` //id
|
|
|
CompanyId int64 `path:",optional"`
|
|
|
}
|
|
|
MiniArticleGetResponse {
|
|
|
Id int64 `json:"id"` //id
|
|
|
Title string `json:"title"` //标题
|
|
|
AuthorId int64 `json:"authorId"` //发布人id
|
|
|
Author Author `json:"author"` //发布人
|
|
|
CreatedAt int64 `json:"createdAt"` //文章的发布时间
|
|
|
Section []ArticleSection `json:"section"` //文章的文本内容
|
|
|
Images []string `json:"images"` //图片
|
|
|
WhoRead []int64 `json:"whoRead"` //谁可查看
|
|
|
WhoReview []int64 `json:"whoReview"` //谁可评论
|
|
|
Location Location `json:"location"` //定位坐标
|
|
|
CountLove int `json:"countLove"` // 点赞数量
|
|
|
CountComment int `json:"countComment"` // 评论数量
|
|
|
CountRead int `json:"countRead"` // 浏览数量
|
|
|
Show int `json:"show"` // 评论的展示状态(0显示、1不显示)
|
|
|
Edit int `json:"edit"` // 文章是否存在变更记录 (0 不存在 1存在)
|
|
|
}
|
|
|
ArticleSection {
|
|
|
Id int64 `json:"id"` //段落id
|
|
|
Content string `json:"content"` // 文本内容
|
|
|
SortBy int `json:"sortBy"` // 排序
|
|
|
TotalComment int `json:"totalComment"` // 评论的数量
|
|
|
}
|
|
|
)
|
|
|
|
|
|
// 小程序获取我的发文章记录
|
|
|
type (
|
|
|
MiniArticleSearchMeRequest {
|
|
|
AuthorId int64 `json:",optional"`
|
|
|
CompanyId int64 `json:",optional"`
|
|
|
Page int `json:"page"`
|
|
|
Size int `json:"size"`
|
|
|
}
|
|
|
|
|
|
MiniArticleSearchMeResponse {
|
|
|
Total int `json:"total"`
|
|
|
List []ArticleSearchMe `json:"list"`
|
|
|
}
|
|
|
|
|
|
ArticleSearchMe {
|
|
|
Id int64 `json:"id"` //id
|
|
|
Title string `json:"title"` //标题
|
|
|
Images []string `json:"images"` //图片
|
|
|
CreatedAt int64 `json:"createdAt"` //文章的创建日期
|
|
|
CountLove int `json:"countLove"` //点赞数量
|
|
|
CountComment int `json:"CountComment"` //评论数量
|
|
|
Show int `json:"show"` //是否隐藏 [0显示、1不显示]
|
|
|
}
|
|
|
)
|
|
|
|
|
|
//小程序端获取文章有哪些人进行了点赞
|
|
|
type (
|
|
|
MiniUserLikeArticleRequest {
|
|
|
ArticleId int64 `json:"articleId"` // 文章id
|
|
|
CompanyId int64 `json:",optional"` //公司id
|
|
|
Page int `json:"page"` //分页,第几页
|
|
|
Size int `json:"size"` //分页,每页几条
|
|
|
}
|
|
|
MiniUserLikeArticleResponse {
|
|
|
Total int64 `json:"total"` //总数
|
|
|
List []WhichUserLikeArticle `json:"list"` //列表
|
|
|
}
|
|
|
WhichUserLikeArticle {
|
|
|
ArticleId int64 `json:"articleId"` // 文章id
|
|
|
UserId int64 `json:"userId"` // 人员id
|
|
|
Name string `json:"name"` // 人员名称
|
|
|
Avatar string `json:"avatar"` // 人员头像
|
|
|
CreatedAt int64 `json:"createdAt"` // 点赞记录的时间
|
|
|
}
|
|
|
)
|
|
|
|
|
|
// 小程序端人员点赞文章/评论
|
|
|
type (
|
|
|
MiniSetUserLikeRequset {
|
|
|
ArticleId int64 `json:"articleId"` //文章id
|
|
|
CommentId int64 `json:"commentId"` //评论id
|
|
|
UserId int64 `json:",optional"` //操作人
|
|
|
Flag int `json:"flag"` //点赞标志 1、点赞 2 、取消点赞
|
|
|
}
|
|
|
MiniSetUserLikeResponse {
|
|
|
ArticleId int64 `json:"articleId"` //文章id
|
|
|
CommentId int64 `json:"commentId"` //评论id
|
|
|
Count int `json:"count"` //现有的点赞数量
|
|
|
}
|
|
|
)
|
|
|
|
|
|
//管理后台获取文章详情
|
|
|
type (
|
|
|
SystemArticleGetRequest {
|
|
|
Id int64 `path:"id"` //id
|
|
|
CompanyId int64 `path:",optional"`
|
|
|
}
|
|
|
|
|
|
UserShowName {
|
|
|
Id int `json:"id"`
|
|
|
Name int `json:"name"`
|
|
|
}
|
|
|
|
|
|
SystemArticleGetResponse {
|
|
|
Id int64 `json:"id"` // id
|
|
|
Title string `json:"title"` // 标题
|
|
|
AuthorId int64 `json:"authorId"` // 发布人id
|
|
|
Author Author `json:"author"` // 发布人
|
|
|
CreatedAt int64 `json:"createdAt"` // 文章的发布时间
|
|
|
Section []ArticleSection `json:"section"` // 文章的文本内容
|
|
|
Images []string `json:"images"` // 图片
|
|
|
WhoRead []int64 `json:"whoRead"` // 谁可查看
|
|
|
WhoReadInfo []UserShowName `json:"whoReadInfo"` // 谁可查看
|
|
|
WhoReview []int64 `json:"whoReview"` // 谁可评论
|
|
|
WhoReviewInfo []UserShowName `json:"whoReviewInfo"` // 谁可评论
|
|
|
Location Location `json:"location"` // 定位坐标
|
|
|
CountLove int `json:"countLove"` // 点赞数量
|
|
|
CountComment int `json:"countComment"` // 评论数量
|
|
|
CountRead int `json:"countRead"` // 浏览数量
|
|
|
Show int `json:"show"` // 评论的展示状态(0显示、1不显示)
|
|
|
}
|
|
|
)
|
|
|
|
|
|
//管理后台获取文章列表 |
|
|
\ No newline at end of file |
...
|
...
|
|