完善实体类
This commit is contained in:
parent
318541bf16
commit
c26acbeed7
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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<String, Claim> 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue