From 42203f1cdba1d0670aa3f2196805af5967b8e176 Mon Sep 17 00:00:00 2001 From: 1005281342 <1005281342@qq.com> Date: Tue, 31 May 2022 21:51:47 +0800 Subject: [PATCH] fix: warning: "Breif" is a misspelling of "Brief" --- internal/model/message.go | 6 +++--- internal/routers/api/message.go | 2 +- internal/service/comment.go | 10 +++++----- internal/service/post.go | 2 +- paopao.sql | 2 +- web/src/components/message-item.vue | 10 +++++----- web/src/types/item.d.ts | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/internal/model/message.go b/internal/model/message.go index 415e3ac4..89a4ae64 100644 --- a/internal/model/message.go +++ b/internal/model/message.go @@ -20,7 +20,7 @@ type Message struct { SenderUserID int64 `json:"sender_user_id"` ReceiverUserID int64 `json:"receiver_user_id"` Type MessageT `json:"type"` - Breif string `json:"breif"` + Brief string `json:"brief"` Content string `json:"content"` PostID int64 `json:"post_id"` CommentID int64 `json:"comment_id"` @@ -34,7 +34,7 @@ type MessageFormated struct { SenderUser *UserFormated `json:"sender_user"` ReceiverUserID int64 `json:"receiver_user_id"` Type MessageT `json:"type"` - Breif string `json:"breif"` + Brief string `json:"brief"` Content string `json:"content"` PostID int64 `json:"post_id"` Post *PostFormated `json:"post"` @@ -57,7 +57,7 @@ func (m *Message) Format() *MessageFormated { SenderUser: &UserFormated{}, ReceiverUserID: m.ReceiverUserID, Type: m.Type, - Breif: m.Breif, + Brief: m.Brief, Content: m.Content, PostID: m.PostID, Post: &PostFormated{}, diff --git a/internal/routers/api/message.go b/internal/routers/api/message.go index 202e9a83..4c49150a 100644 --- a/internal/routers/api/message.go +++ b/internal/routers/api/message.go @@ -86,7 +86,7 @@ func SendUserWhisper(c *gin.Context) { SenderUserID: userID.(int64), ReceiverUserID: param.UserID, Type: model.MESSAGE_WHISPER, - Breif: "给你发送新私信了", + Brief: "给你发送新私信了", Content: param.Content, }) diff --git a/internal/service/comment.go b/internal/service/comment.go index 9ef87f67..cf5bd84b 100644 --- a/internal/service/comment.go +++ b/internal/service/comment.go @@ -145,7 +145,7 @@ func (svc *Service) CreatePostComment(userID int64, param CommentCreationReq) (* SenderUserID: userID, ReceiverUserID: postMaster.ID, Type: model.MESSAGE_COMMENT, - Breif: "在泡泡中评论了你", + Brief: "在泡泡中评论了你", PostID: post.ID, CommentID: comment.ID, }) @@ -161,7 +161,7 @@ func (svc *Service) CreatePostComment(userID int64, param CommentCreationReq) (* SenderUserID: userID, ReceiverUserID: user.ID, Type: model.MESSAGE_COMMENT, - Breif: "在泡泡评论中@了你", + Brief: "在泡泡评论中@了你", PostID: post.ID, CommentID: comment.ID, }) @@ -246,7 +246,7 @@ func (svc *Service) CreatePostCommentReply(commentID int64, content string, user SenderUserID: userID, ReceiverUserID: commentMaster.ID, Type: model.MESSAGE_REPLY, - Breif: "在泡泡评论下回复了你", + Brief: "在泡泡评论下回复了你", PostID: post.ID, CommentID: comment.ID, ReplyID: reply.ID, @@ -258,7 +258,7 @@ func (svc *Service) CreatePostCommentReply(commentID int64, content string, user SenderUserID: userID, ReceiverUserID: postMaster.ID, Type: model.MESSAGE_REPLY, - Breif: "在泡泡评论下发布了新回复", + Brief: "在泡泡评论下发布了新回复", PostID: post.ID, CommentID: comment.ID, ReplyID: reply.ID, @@ -272,7 +272,7 @@ func (svc *Service) CreatePostCommentReply(commentID int64, content string, user SenderUserID: userID, ReceiverUserID: user.ID, Type: model.MESSAGE_REPLY, - Breif: "在泡泡评论的回复中@了你", + Brief: "在泡泡评论的回复中@了你", PostID: post.ID, CommentID: comment.ID, ReplyID: reply.ID, diff --git a/internal/service/post.go b/internal/service/post.go index ea89dbc9..00dec7d1 100644 --- a/internal/service/post.go +++ b/internal/service/post.go @@ -125,7 +125,7 @@ func (svc *Service) CreatePost(userID int64, param PostCreationReq) (*model.Post SenderUserID: userID, ReceiverUserID: user.ID, Type: model.MESSAGE_POST, - Breif: "在新发布的泡泡动态中@了你", + Brief: "在新发布的泡泡动态中@了你", PostID: post.ID, }) } diff --git a/paopao.sql b/paopao.sql index c134f55d..d78496d5 100644 --- a/paopao.sql +++ b/paopao.sql @@ -111,7 +111,7 @@ CREATE TABLE `p_message` ( `sender_user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '发送方用户ID', `receiver_user_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '接收方用户ID', `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '通知类型,1动态,2评论,3回复,4私信,99系统通知', - `breif` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '摘要说明', + `brief` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '摘要说明', `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '详细内容', `post_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '动态ID', `comment_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '评论ID', diff --git a/web/src/components/message-item.vue b/web/src/components/message-item.vue index bb873603..e01f6a71 100644 --- a/web/src/components/message-item.vue +++ b/web/src/components/message-item.vue @@ -46,11 +46,11 @@