模态框跟换为layx,代码优化,新建帖子时可新建标签
This commit is contained in:
@@ -2,10 +2,7 @@ package com.yaoyuan.jiscuss.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.*;
|
||||
|
||||
import lombok.Data;
|
||||
@Data
|
||||
@@ -13,8 +10,11 @@ import lombok.Data;
|
||||
@Table(name="discussiontag")
|
||||
public class DiscussionTag implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
@Column(name="discussion_id")
|
||||
private Integer discussionId;
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.yaoyuan.jiscuss.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author yaoyuan2.chu
|
||||
* @Title:
|
||||
* @Package com.yaoyuan.jiscuss.entity
|
||||
* @Description:
|
||||
* @date 2020/10/21 12:00
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name="likecollect")
|
||||
public class LikeCollect implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
@Column(name="discussion_id")
|
||||
private Integer discussionId;
|
||||
|
||||
@Column(name="discussion_name")
|
||||
private String discussionName;
|
||||
|
||||
@Column(name="tag_id")
|
||||
private Integer tagId;
|
||||
|
||||
@Column(name="post_id")
|
||||
private Integer postId;
|
||||
|
||||
@Column(name="post_content")
|
||||
private String postContent;
|
||||
|
||||
@Column(name="user_id")
|
||||
private Integer userId;
|
||||
|
||||
@Column(name="user_name")
|
||||
private String userName;
|
||||
|
||||
@Column(name="type")
|
||||
private String type;
|
||||
|
||||
@Column(name="like_type")
|
||||
private String likeType;
|
||||
|
||||
@Column(name="collect_type")
|
||||
private String collectType;
|
||||
|
||||
@Column(name="create_id")
|
||||
private Integer createId;
|
||||
|
||||
@Column(name="create_time")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class DiscussionCustom extends Discussion {
|
||||
|
||||
private String tag;
|
||||
|
||||
private List<Tag> tagList;
|
||||
private List<TagCustom> tagList;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.yaoyuan.jiscuss.entity.custom;
|
||||
|
||||
import com.yaoyuan.jiscuss.entity.Post;
|
||||
import com.yaoyuan.jiscuss.entity.Tag;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
|
||||
/**
|
||||
* @author yaoyuan2.chu
|
||||
* @Title:
|
||||
* @Package com.yaoyuan.jiscuss.entity.custom
|
||||
* @Description:
|
||||
* @date 2020/10/21 10:05
|
||||
*/
|
||||
@Data
|
||||
@Setter
|
||||
@Getter
|
||||
public class TagCustom {
|
||||
|
||||
@Column(name="name")
|
||||
private String name;
|
||||
|
||||
@Column(name="description")
|
||||
private String description;
|
||||
|
||||
@Column(name="color")
|
||||
private String color;
|
||||
|
||||
@Column(name="icon")
|
||||
private String icon;
|
||||
|
||||
@Column(name="discussion_id")
|
||||
private Integer discussionId;
|
||||
|
||||
|
||||
public TagCustom(String name, String color, String icon, String description, Integer discussionId) {
|
||||
this.name = name;
|
||||
this.color = color;
|
||||
this.icon = icon;
|
||||
this.description = description;
|
||||
this.discussionId = discussionId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user