/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.work.entity.review;

import com.fasterxml.jackson.annotation.JsonBackReference;
import javax.validation.constraints.NotNull;

import com.jeeplus.common.persistence.TreeEntity;

/**
 * 工作报告的评论与回复Entity
 * @author 许凯
 * @version 2017-04-28
 */
public class WorkReportReview extends TreeEntity<WorkReportReview> {
	
	private static final long serialVersionUID = 1L;
	private WorkReportReview parent;		// 父级编号
	private String parentIds;		// 所有父级编号
	private String reportId;		// 公告ID
	private String type;		// 类型
	private String content;		// 内容
	
	public WorkReportReview() {
		super();
	}

	public WorkReportReview(String id){
		super(id);
	}

	@JsonBackReference
	@NotNull(message="父级编号不能为空")
	public WorkReportReview getParent() {
		return parent;
	}

	public void setParent(WorkReportReview parent) {
		this.parent = parent;
	}
	
	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}
	
	public String getReportId() {
		return reportId;
	}

	public void setReportId(String reportId) {
		this.reportId = reportId;
	}
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	public String getParentId() {
		return parent != null && parent.getId() != null ? parent.getId() : "0";
	}
}