package com.ssj.bean.weixin.zyb.domain;

import com.ssj.bean.common.framework.core.domain.BaseEntity;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


/** 
 * @author  ZhangCaibao 
 * @version 2017年7月4日 上午10:51:25 
 * 类说明    打分内容。。	
 */
@Entity
@Table(name = "zyb_scoring_content")
public class ZuoybScoringContent  extends BaseEntity{
	
	
     /**
	 * 
	 */
	private static final long serialVersionUID = 8324519071804442004L;
	/**
      * 图书馆ID 初始化未SSJ
      */
	 private String libId;
	 /**
	     * 课程ID
	     */
	 private String zybCourseId;
	 /**
	  * 一级标签内容
	  */
	 private String content;
	 /**
	  * 序号 按照 1,2,3来排序
	  */
	 private Integer num;
	 /**
	  * 1原始数据，只能修改，不能删除，2图书馆自己添加的数据
	  */
	 private Integer type;
	 
	 /**
		 * 创建时间
		 */
	 private Date  createTime;
	 
	 private String pid;//父ID
	 
	 /**
		 *(1,单选，2多选，3文本域，4输入字符框,5输入数字框)
		 */
	 private Integer stat;
	 /**
	  * 匹配语句
	  */
	 private String matching;
	 /**
	  * 子节点展示，1一个一行，2多个一行 数据库默认1
	  */
	 private Integer childStat;
	 
	 private List<ZuoybScoringContentDetails>  contentDetailsList = new ArrayList<ZuoybScoringContentDetails>();

	public String getLibId() {
		return libId;
	}

	public void setLibId(String libId) {
		this.libId = libId;
	}

	public String getZybCourseId() {
		return zybCourseId;
	}

	public void setZybCourseId(String zybCourseId) {
		this.zybCourseId = zybCourseId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
	@Column(updatable =false)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@OneToMany(cascade = { CascadeType.REFRESH}, fetch=FetchType.EAGER)
	@JoinColumn(name="scoringContentId",updatable =false,insertable =false)
	@OrderBy(" num asc")
	@Fetch(FetchMode.SELECT)
	public List<ZuoybScoringContentDetails> getContentDetailsList() {
		return contentDetailsList;
	}

	public void setContentDetailsList(
			List<ZuoybScoringContentDetails> contentDetailsList) {
		this.contentDetailsList = contentDetailsList;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public Integer getStat() {
		return stat;
	}

	public void setStat(Integer stat) {
		this.stat = stat;
	}

	public String getMatching() {
		return matching;
	}

	public void setMatching(String matching) {
		this.matching = matching;
	}

	public Integer getChildStat() {
		return childStat;
	}

	public void setChildStat(Integer childStat) {
		this.childStat = childStat;
	}
	 
	 
	 
}
