diff --git a/core/src/main/java/com/jinrui/reference/core/model/entity/Column.java b/core/src/main/java/com/jinrui/reference/core/model/entity/Column.java new file mode 100644 index 0000000..a8a89a2 --- /dev/null +++ b/core/src/main/java/com/jinrui/reference/core/model/entity/Column.java @@ -0,0 +1,75 @@ +package com.jinrui.reference.core.model.entity; + +import java.util.Date; + +/** + * 栏目 + */ +@SuppressWarnings("unused") +public class Column { + + /** + * 栏目ID + */ + private Long id; + + /** + * 栏目名称 + */ + private String name; + + /** + * 栏目顺序 + */ + private Integer order; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 编辑时间 + */ + private Date updateTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getOrder() { + return order; + } + + public void setOrder(Integer order) { + this.order = order; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } +} diff --git a/core/src/main/java/com/jinrui/reference/core/model/entity/DraftColumnRel.java b/core/src/main/java/com/jinrui/reference/core/model/entity/DraftColumnRel.java new file mode 100644 index 0000000..2b9ac60 --- /dev/null +++ b/core/src/main/java/com/jinrui/reference/core/model/entity/DraftColumnRel.java @@ -0,0 +1,47 @@ +package com.jinrui.reference.core.model.entity; + +/** + * 新闻草稿 - 栏目关联表 + */ +@SuppressWarnings("unused") +public class DraftColumnRel { + + /** + * 关联表ID + */ + private Long id; + + /** + * 新闻草稿ID + */ + private Long draftId; + + /** + * 栏目ID + */ + private Long columnId; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getDraftId() { + return draftId; + } + + public void setDraftId(Long draftId) { + this.draftId = draftId; + } + + public Long getColumnId() { + return columnId; + } + + public void setColumnId(Long columnId) { + this.columnId = columnId; + } +} diff --git a/core/src/main/java/com/jinrui/reference/core/model/entity/DraftTagRel.java b/core/src/main/java/com/jinrui/reference/core/model/entity/DraftTagRel.java new file mode 100644 index 0000000..b40dbdb --- /dev/null +++ b/core/src/main/java/com/jinrui/reference/core/model/entity/DraftTagRel.java @@ -0,0 +1,47 @@ +package com.jinrui.reference.core.model.entity; + +/** + * 新闻草稿 - 标签关联表 + */ +@SuppressWarnings("unused") +public class DraftTagRel { + + /** + * 关联表ID + */ + private Long id; + + /** + * 新闻草稿ID + */ + private Long draftId; + + /** + * 标签ID + */ + private Long tagId; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getDraftId() { + return draftId; + } + + public void setDraftId(Long draftId) { + this.draftId = draftId; + } + + public Long getTagId() { + return tagId; + } + + public void setTagId(Long tagId) { + this.tagId = tagId; + } +} diff --git a/core/src/main/java/com/jinrui/reference/core/model/entity/News.java b/core/src/main/java/com/jinrui/reference/core/model/entity/News.java new file mode 100644 index 0000000..e7878ba --- /dev/null +++ b/core/src/main/java/com/jinrui/reference/core/model/entity/News.java @@ -0,0 +1,166 @@ +package com.jinrui.reference.core.model.entity; + +import java.util.Date; + +/** + * 新闻 + */ +@SuppressWarnings("unused") +public class News { + + /** + * 新闻ID + */ + private Long id; + + /** + * 草稿ID - 当草稿ID不为NULL时,管理后台新闻详情返回草稿的内容 + */ + private Long draftId; + + /** + * 编辑ID - 最后一个点击发布的人的ID + */ + private Long editorId; + + /** + * 新闻标题 + */ + private String title; + + /** + * 新闻摘要 + */ + private String summary; + + /** + * 新闻图片URL + */ + private String picture; + + /** + * 新闻类型 0-普通 | 1-vip + */ + private Integer type; + + /** + * H5富文本 + */ + private String content; + + /** + * 新闻状态 0-草稿 | 1-未发布 | 2-已发布 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 发布时间 + */ + private Date publishTime; + + /** + * 修改时间 + */ + private Date updateTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getDraftId() { + return draftId; + } + + public void setDraftId(Long draftId) { + this.draftId = draftId; + } + + public Long getEditorId() { + return editorId; + } + + public void setEditorId(Long editorId) { + this.editorId = editorId; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getSummary() { + return summary; + } + + public void setSummary(String summary) { + this.summary = summary; + } + + public String getPicture() { + return picture; + } + + public void setPicture(String picture) { + this.picture = picture; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getPublishTime() { + return publishTime; + } + + public void setPublishTime(Date publishTime) { + this.publishTime = publishTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } +} diff --git a/core/src/main/java/com/jinrui/reference/core/model/entity/NewsColumnRel.java b/core/src/main/java/com/jinrui/reference/core/model/entity/NewsColumnRel.java new file mode 100644 index 0000000..485fd46 --- /dev/null +++ b/core/src/main/java/com/jinrui/reference/core/model/entity/NewsColumnRel.java @@ -0,0 +1,47 @@ +package com.jinrui.reference.core.model.entity; + +/** + * 新闻 - 栏目关联表 + */ +@SuppressWarnings("unused") +public class NewsColumnRel { + + /** + * 关联表ID + */ + private Long id; + + /** + * 新闻ID + */ + private Long newsId; + + /** + * 栏目ID + */ + private Long columnId; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getNewsId() { + return newsId; + } + + public void setNewsId(Long newsId) { + this.newsId = newsId; + } + + public Long getColumnId() { + return columnId; + } + + public void setColumnId(Long columnId) { + this.columnId = columnId; + } +} diff --git a/core/src/main/java/com/jinrui/reference/core/model/entity/NewsDraft.java b/core/src/main/java/com/jinrui/reference/core/model/entity/NewsDraft.java new file mode 100644 index 0000000..25f400c --- /dev/null +++ b/core/src/main/java/com/jinrui/reference/core/model/entity/NewsDraft.java @@ -0,0 +1,114 @@ +package com.jinrui.reference.core.model.entity; + +import java.util.Date; + +/** + * 新闻草稿 + */ +@SuppressWarnings("unused") +public class NewsDraft { + + /** + * 新闻ID + */ + private Long id; + + /** + * 新闻标题 + */ + private String title; + + /** + * 新闻摘要 + */ + private String summary; + + /** + * 新闻图片URL + */ + private String picture; + + /** + * 新闻类型 0-普通 | 1-vip + */ + private Integer type; + + /** + * H5富文本 + */ + private String content; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getSummary() { + return summary; + } + + public void setSummary(String summary) { + this.summary = summary; + } + + public String getPicture() { + return picture; + } + + public void setPicture(String picture) { + this.picture = picture; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } +} diff --git a/core/src/main/java/com/jinrui/reference/core/model/entity/NewsTagRel.java b/core/src/main/java/com/jinrui/reference/core/model/entity/NewsTagRel.java new file mode 100644 index 0000000..a5d49af --- /dev/null +++ b/core/src/main/java/com/jinrui/reference/core/model/entity/NewsTagRel.java @@ -0,0 +1,47 @@ +package com.jinrui.reference.core.model.entity; + +/** + * 新闻 - 标签关联表 + */ +@SuppressWarnings("unused") +public class NewsTagRel { + + /** + * 关联表ID + */ + private Long id; + + /** + * 新闻ID + */ + private Long newsId; + + /** + * 标签ID + */ + private Long tagId; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getNewsId() { + return newsId; + } + + public void setNewsId(Long newsId) { + this.newsId = newsId; + } + + public Long getTagId() { + return tagId; + } + + public void setTagId(Long tagId) { + this.tagId = tagId; + } +} diff --git a/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUser.java b/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUser.java new file mode 100644 index 0000000..0a16303 --- /dev/null +++ b/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUser.java @@ -0,0 +1,110 @@ +package com.jinrui.reference.mini.model.entity; + +import com.auth0.jwt.interfaces.Claim; +import com.auth0.jwt.interfaces.DecodedJWT; + +import java.util.Date; +import java.util.Map; + +/** + * H5前台用户 + */ +@SuppressWarnings("unused") +public class MiniUser { + + /** + * 用户ID + */ + private Long id; + + /** + * 用户手机号 + */ + private String phone; + + /** + * 用户名称 + */ + private String name; + + /** + * 用户创建时间 + */ + private Date createTime; + + /** + * 用户修改时间 + */ + private Date updateTime; + + public MiniUser() {} + + public MiniUser(DecodedJWT decodedJWT) { + for (Map.Entry entry : decodedJWT.getClaims().entrySet()) { + String keyName = entry.getKey(); + Claim value = entry.getValue(); + switch (keyName) { + case "id": { + this.id = value.asLong(); + break; + } + case "phone": { + this.phone = value.asString(); + break; + } + case "name": { + this.name = value.asString(); + break; + } + case "createTime": { + this.createTime = new Date(value.asLong()); + break; + } + case "updateTime": { + this.updateTime = new Date(value.asLong()); + break; + } + } + } + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } +} diff --git a/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUserFavoriteRel.java b/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUserFavoriteRel.java new file mode 100644 index 0000000..2632f66 --- /dev/null +++ b/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUserFavoriteRel.java @@ -0,0 +1,75 @@ +package com.jinrui.reference.mini.model.entity; + +import java.util.Date; + +/** + * H5前台用户点赞记录 + */ +@SuppressWarnings("unused") +public class MiniUserFavoriteRel { + + /** + * 关联表ID + */ + private Long id; + + /** + * H5前台用户ID + */ + private Long miniUserId; + + /** + * 访问记录类型 0-长文 | 1-快讯 + */ + private Integer type; + + /** + * 长文/快讯ID + */ + private Long newsId; + + /** + * 访问时间 + */ + private Date createTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMiniUserId() { + return miniUserId; + } + + public void setMiniUserId(Long miniUserId) { + this.miniUserId = miniUserId; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Long getNewsId() { + return newsId; + } + + public void setNewsId(Long newsId) { + this.newsId = newsId; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } +} diff --git a/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUserLikeRel.java b/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUserLikeRel.java new file mode 100644 index 0000000..9ec2d36 --- /dev/null +++ b/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUserLikeRel.java @@ -0,0 +1,75 @@ +package com.jinrui.reference.mini.model.entity; + +import java.util.Date; + +/** + * H5前台用户点赞记录 + */ +@SuppressWarnings("unused") +public class MiniUserLikeRel { + + /** + * 关联表ID + */ + private Long id; + + /** + * H5前台用户ID + */ + private Long miniUserId; + + /** + * 访问记录类型 0-长文 | 1-快讯 + */ + private Integer type; + + /** + * 长文/快讯ID + */ + private Long newsId; + + /** + * 访问时间 + */ + private Date createTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMiniUserId() { + return miniUserId; + } + + public void setMiniUserId(Long miniUserId) { + this.miniUserId = miniUserId; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Long getNewsId() { + return newsId; + } + + public void setNewsId(Long newsId) { + this.newsId = newsId; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } +} diff --git a/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUserVisitRel.java b/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUserVisitRel.java new file mode 100644 index 0000000..a2d4cf4 --- /dev/null +++ b/mini/src/main/java/com/jinrui/reference/mini/model/entity/MiniUserVisitRel.java @@ -0,0 +1,75 @@ +package com.jinrui.reference.mini.model.entity; + +import java.util.Date; + +/** + * H5前台用户访问记录 + */ +@SuppressWarnings("unused") +public class MiniUserVisitRel { + + /** + * 关联表ID + */ + private Long id; + + /** + * H5前台用户ID + */ + private Long miniUserId; + + /** + * 访问记录类型 0-长文 | 1-快讯 + */ + private Integer type; + + /** + * 长文/快讯ID + */ + private Long newsId; + + /** + * 访问时间 + */ + private Date createTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMiniUserId() { + return miniUserId; + } + + public void setMiniUserId(Long miniUserId) { + this.miniUserId = miniUserId; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Long getNewsId() { + return newsId; + } + + public void setNewsId(Long newsId) { + this.newsId = newsId; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } +}