123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- syntax = "proto3";
- // package声明符,用来防止不同的消息类型有命名冲突
- package pb_v1;
- // 用于生成指定语言go的包名称
- option go_package = "property-garden/pb/v1";
- // 社区邻里分类
- message NeighborClassAddRequest {
- int64 garden_id = 1;
- // 分类名
- string class_name = 2;
- // 分类图标
- string class_pic = 3;
- // true 开启 false 禁用
- bool enable = 4;
- }
- message NeighborClassAddReply {
- }
- message NeighborClassDelRequest {
- int64 garden_id = 1;
- int64 id = 2;
- }
- message NeighborClassDelReply {
- }
- message NeighborClassUpdateRequest {
- int64 garden_id = 1;
- int64 id = 2;
- string class_name = 3;
- string class_pic = 4;
- bool enable = 5;
- }
- message NeighborClassUpdateReply {
- }
- message NeighborClassItem {
- int64 id = 1;
- string class_name = 2;
- string class_pic = 3;
- bool enable = 4;
- // 分类下的文章总数
- int64 article_count = 5;
- // 分类创建时间
- string created_at = 6;
- // 分类结束时间
- string updated_at = 7;
- }
- message NeighborClassListRequest {
- int64 garden_id = 1;
- string class_name = 2;
- int64 page = 3;
- int64 page_size = 4;
- }
- message NeighborClassListReply {
- int64 page = 1;
- int64 total = 2;
- repeated NeighborClassItem list = 3;
- }
- // 社区邻里文章
- message NeighborArticleAddRequest {
- int64 garden_id = 1;
- // 文章标题
- string title = 2;
- // 文章类容
- string content = 3;
- // 文章图片
- repeated string pics = 4;
- // 分类id
- int64 class_id = 5;
- int64 uid = 6;
- string user_icon = 7;
- string nick_name = 8;
- }
- message NeighborArticleAddReply {
- }
- message NeighborArticleDelRequest {
- int64 garden_id = 1;
- int64 id = 2;
- int64 uid = 3;
- bool admin = 4;
- }
- message NeighborArticleDelReply {
- }
- message NeighborArticleUpdateRequest {
- int64 garden_id = 1;
- string title = 2;
- string content = 3;
- repeated string pics = 4;
- int64 id = 5;
- int64 uid = 6;
- }
- message NeighborArticleUpdateReply {
- }
- message NeighborArticleItem {
- int64 id = 1;
- string title = 2;
- string content = 3;
- repeated string pics = 4;
- // 文章点赞数
- int64 likes = 5;
- // 评论总数
- int64 comment_count = 6;
- string created_at = 7;
- string updated_at = 8;
- // 分类id
- int64 class_id = 9;
- // true 本人已点赞 false 本人未点赞
- bool like = 10;
- int64 uid = 11;
- string user_name = 12;
- string user_phone = 13;
- // 用户头像
- string user_icon = 14;
- // 是否是本人发布的文章
- bool owner = 15;
- string nick_name = 16;
- }
- message NeighborArticleListRequest {
- int64 garden_id = 1;
- int64 page = 2;
- int64 page_size = 3;
- string title = 4;
- int64 class_id = 5;
- int64 uid = 6;
- bool is_me = 7;
- }
- message NeighborArticleListReply {
- int64 page = 1;
- int64 total = 2;
- repeated NeighborArticleItem list = 3;
- }
- message NeighborLikeRequest {
- int64 garden_id = 1;
- int64 uid = 2;
- // 点赞id
- int64 like_id = 3;
- // 点赞类型 1 文章 2 评论
- int32 like_type = 4;
- // true 点赞 false 取消点赞
- bool like = 5;
- }
- message NeighborLikeReply {
- }
- // 社区邻里评论
- message NeighborCommentAddRequest {
- int64 garden_id = 1;
- // pid 和 article_id 二选一, 当为文章评论使用article_id, 当为评论添加子评论使用pid
- int64 pid = 4;
- int64 article_id = 5;
- string content = 6;
- repeated string pics = 7;
- int64 uid = 8;
- string user_icon = 9;
- string nick_name = 10;
- }
- message NeighborCommentAddReply {
- }
- message NeighborCommentDelRequest {
- int64 garden_id = 1;
- int64 id = 2;
- int64 uid = 3;
- bool admin = 4;
- }
- message NeighborCommentDelReply {
- }
- message NeighborCommentUpdateRequest {
- int64 garden_id = 1;
- string content = 2;
- int64 uid = 3;
- int64 id = 4;
- repeated string pics = 5;
- }
- message NeighborCommentUpdateReply {
- }
- message NeighborCommentListRequest {
- int64 garden_id = 1;
- int64 article_id = 2;
- int64 comment_id = 3;
- int64 page = 4;
- int64 page_size = 5;
- int64 uid = 6;
- }
- message NeighborCommentItem {
- int64 id = 1;
- string content = 2;
- int64 uid = 3;
- string user_name = 4;
- string user_phone = 5;
- // 用户头像
- string user_icon = 6;
- repeated string pics = 7;
- // 子评论数
- int64 sub_comment_count = 8;
- // 点赞数
- int64 likes = 9;
- // 本人是否点赞
- bool like = 10;
- string created_at = 11;
- string updated_at = 12;
- // 是否是本人发布的文章
- bool owner = 13;
- string nick_name = 14;
- }
- message NeighborCommentListReply {
- int64 total = 1;
- int64 page = 2;
- repeated NeighborCommentItem list = 3;
- }
|