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.*;


/** 
 * @author  ZhangCaibao 
 * @version 2017年11月1日 下午2:22:02 
 * 类说明 
 */
@Entity
@Table(name = "zyb_student_work_how")
public class ZuoybStudentWorkHow extends BaseEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 打分ID
	 */
	private String  studentWorkId;
	/**
	 * 大纲ID
	 */
	private String howId;
	/**
	 * 大纲内容
	 */
	private String howName;
	/**
	 * 排序
	 */
	private Integer num;
	
	private Date    createTime;
	
	/**
	 * 模块（新）
	 */
	private String module;
	
	private Integer type;//1是全部，2是错题
	

	/**
	 *  勾选的大纲明细
	 */
	private List<ZuoybStudentWorkHowDetails> workHowDetailsList =new ArrayList<ZuoybStudentWorkHowDetails>();
	/**
	 * 存放总体报告中的作业点数，作业错题总数，建议重点
	 */
	private Map<String,Object> map =new HashMap<String,Object>();
	
	public ZuoybStudentWorkHow(){};
	public ZuoybStudentWorkHow(String howId ,String howName){
		this.howId=howId;
		this.howName=howName;
	}
	
	public String getStudentWorkId() {
		return studentWorkId;
	}
	public void setStudentWorkId(String studentWorkId) {
		this.studentWorkId = studentWorkId;
	}
	public String getHowId() {
		return howId;
	}
	public void setHowId(String howId) {
		this.howId = howId;
	}
	public String getHowName() {
		return howName;
	}
	public void setHowName(String howName) {
		this.howName = howName;
	}
	public Integer getNum() {
		return num;
	}
	public void setNum(Integer num) {
		this.num = num;
	}
	@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="workHowId",updatable =false,insertable =false)
	@OrderBy(" num asc")
	@Fetch(FetchMode.SELECT)
	public List<ZuoybStudentWorkHowDetails> getWorkHowDetailsList() {
		return workHowDetailsList;
	}
	public void setWorkHowDetailsList(
			List<ZuoybStudentWorkHowDetails> workHowDetailsList) {
		this.workHowDetailsList = workHowDetailsList;
	}

	@Transient
	public Map<String, Object> getMap() {
		return map;
	}
	public void setMap(Map<String, Object> map) {
		this.map = map;
	}
	public String getModule() {
		return module;
	}
	public void setModule(String module) {
		this.module = module;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	
	
}
