正在显示
3 个修改的文件
包含
10 行增加
和
18 行删除
| @@ -13,7 +13,7 @@ type Article struct { | @@ -13,7 +13,7 @@ type Article struct { | ||
| 13 | UpdatedAt time.Time | 13 | UpdatedAt time.Time |
| 14 | DeletedAt *time.Time | 14 | DeletedAt *time.Time |
| 15 | AuthorId int64 // 发布人 | 15 | AuthorId int64 // 发布人 |
| 16 | - Author ArticleAuthor // 发布人 | 16 | + Author UserSimple // 发布人 |
| 17 | Title string // 文章标题 | 17 | Title string // 文章标题 |
| 18 | Images []Image // 图片 | 18 | Images []Image // 图片 |
| 19 | WhoRead []int64 // 谁可以看 | 19 | WhoRead []int64 // 谁可以看 |
| @@ -22,13 +22,6 @@ type Article struct { | @@ -22,13 +22,6 @@ type Article struct { | ||
| 22 | // ...more | 22 | // ...more |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | -type ArticleAuthor struct { | ||
| 26 | - Id int64 // 人员id | ||
| 27 | - Name string // 人员的名字 | ||
| 28 | - Avatar string // 人员头像URL | ||
| 29 | - Group string // 人员的分组 | ||
| 30 | -} | ||
| 31 | - | ||
| 32 | type ArticleRepository interface { | 25 | type ArticleRepository interface { |
| 33 | Insert(ctx context.Context, conn transaction.Conn, dm *Article) (*Article, error) | 26 | Insert(ctx context.Context, conn transaction.Conn, dm *Article) (*Article, error) |
| 34 | Update(ctx context.Context, conn transaction.Conn, dm *Article) (*Article, error) | 27 | Update(ctx context.Context, conn transaction.Conn, dm *Article) (*Article, error) |
| @@ -14,20 +14,12 @@ type ArticleComment struct { | @@ -14,20 +14,12 @@ type ArticleComment struct { | ||
| 14 | ArticleSectionId int64 // 文本内容id | 14 | ArticleSectionId int64 // 文本内容id |
| 15 | SectionContent string // 引用的文章内容文本 | 15 | SectionContent string // 引用的文章内容文本 |
| 16 | FromUserId int64 // 谁填写的评论 | 16 | FromUserId int64 // 谁填写的评论 |
| 17 | - FromUser CommentUser // 谁填写的评论 | 17 | + FromUser UserSimple // 谁填写的评论 |
| 18 | ToUserId int64 // 回复谁的评论 | 18 | ToUserId int64 // 回复谁的评论 |
| 19 | - ToUser CommentUser // 回复谁的评论 | 19 | + ToUser UserSimple // 回复谁的评论 |
| 20 | Content string // 评论内容 | 20 | Content string // 评论内容 |
| 21 | CountReply int // 回复数量 | 21 | CountReply int // 回复数量 |
| 22 | CountUserLove int // 用户点赞数量 | 22 | CountUserLove int // 用户点赞数量 |
| 23 | CountAdminLove int // 运营点赞数量 | 23 | CountAdminLove int // 运营点赞数量 |
| 24 | // ...more | 24 | // ...more |
| 25 | } | 25 | } |
| 26 | - | ||
| 27 | -// 评论的填写人 | ||
| 28 | -type CommentUser struct { | ||
| 29 | - Id int64 // 人员id | ||
| 30 | - Name string // 人员的名字 | ||
| 31 | - Avatar string // 人员头像URL | ||
| 32 | - Group string // 人员的分组 | ||
| 33 | -} |
| @@ -13,3 +13,10 @@ type Location struct { | @@ -13,3 +13,10 @@ type Location struct { | ||
| 13 | Latitude float64 `json:"latitude"` //纬度 | 13 | Latitude float64 `json:"latitude"` //纬度 |
| 14 | Descript string `json:"descript"` //地点描述 | 14 | Descript string `json:"descript"` //地点描述 |
| 15 | } | 15 | } |
| 16 | + | ||
| 17 | +type UserSimple struct { | ||
| 18 | + Id int64 // 人员id | ||
| 19 | + Name string // 人员的名字 | ||
| 20 | + Avatar string // 人员头像URL | ||
| 21 | + Group string // 人员的分组 | ||
| 22 | +} |
-
请 注册 或 登录 后发表评论