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

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;
import javax.persistence.Transient;

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

/** 
 * @author  ZhangCaibao 
 * @version 2017年7月4日 下午4:43:13 
 * 类说明  打分记录表
 */
@Entity
@Table(name = "zyb_student_work")
public class ZuoybStudentWork extends BaseEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = 305935706398210406L;
	/**
	 * 学生ID
	 */
	private String studentId;
	/**
	 * 老师ID
	 */
	private String teacherId;
	/**
	 * 打分时间
	 */
	private Date    scoringTime;
	
	/**
	 * 推送时间
	 */
	private Date    pushTime;


	/**
	 * 课程
	 */
	private String zybCourseId;
	
	/**
	 * 图书馆ID
	 */
	private String libId;
	
	/**
	 * 1,有作业 2 没有作业
	 */
	private Integer type;
	/**
	 * 1未开始，2已完成，3已提交
	 */
	private Integer stat;
	
	private String vipId;
	
	private String courseName;
	
	private String studentPushId;
	
	/**
	 * 课程时段
	 */
	private String courseHour;
	/**
	 * 知识大纲html
	 */
	private String  howHtml;
	/**
	 * 选中的知识大纲明细主键ID
	 */
	private String  howIds;
	
	private String howNames;		
	/**
	 * 排序
	 */
	private Integer num;
	

	private List<ZuoybStudentWorkDetails>  workDetailsList = new ArrayList<ZuoybStudentWorkDetails>();
	private List<ZuoybStudentWorkImg>  imgList = new ArrayList<ZuoybStudentWorkImg>();
	private List<ZuoybStudentWorkHow>  workHowList = new ArrayList<ZuoybStudentWorkHow>();
	
	
	private String pid;
	
	/**
	 * 
	 */
	private List<Map<String,Object>>   showImgList = new ArrayList<Map<String,Object>>();
	/**
	 * 用时情况
	 */
	private String timeCost;
	
	
	private String timers;
	/**
	 * 已掌握知识点
	 */
	private List<String> hasMastered =new ArrayList<String>();
	/**
	 * 未掌握知识点
	 */
	private List<String> notMastered =new ArrayList<String>();
	
	
	
	public String getStudentId() {
		return studentId;
	}

	public void setStudentId(String studentId) {
		this.studentId = studentId;
	}

	public String getTeacherId() {
		return teacherId;
	}

	public void setTeacherId(String teacherId) {
		this.teacherId = teacherId;
	}

	@Column(updatable =false)
	public Date getScoringTime() {
		return scoringTime;
	}

	public void setScoringTime(Date scoringTime) {
		this.scoringTime = scoringTime;
	}

	public String getZybCourseId() {
		return zybCourseId;
	}

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

	public String getLibId() {
		return libId;
	}

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

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getStat() {
		return stat;
	}

	public void setStat(Integer stat) {
		this.stat = stat;
	}
	@OneToMany(cascade = { CascadeType.REFRESH}, fetch=FetchType.EAGER)
	@JoinColumn(name="studentWorkId",updatable =false,insertable =false)
	@OrderBy(" num asc")
	@Fetch(FetchMode.SELECT)
	public List<ZuoybStudentWorkDetails> getWorkDetailsList() {
		return workDetailsList;
	}

	public void setWorkDetailsList(List<ZuoybStudentWorkDetails> workDetailsList) {
		this.workDetailsList = workDetailsList;
	}
	public String getVipId() {
		return vipId;
	}

	public void setVipId(String vipId) {
		this.vipId = vipId;
	}
	@Column(insertable =false)
	public Date getPushTime() {
		return pushTime;
	}

	public void setPushTime(Date pushTime) {
		this.pushTime = pushTime;
	}
	@OneToMany(cascade = { CascadeType.REFRESH}, fetch=FetchType.EAGER)
	@JoinColumn(name="objectId",updatable =false,insertable =false)
	@OrderBy(" num asc")
	@Fetch(FetchMode.SELECT)
	public List<ZuoybStudentWorkImg> getImgList() {
		return imgList;
	}

	public void setImgList(List<ZuoybStudentWorkImg> imgList) {
		this.imgList = imgList;
	}
    @Transient
	public String getPid() {
		return pid;
	}

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

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public String getStudentPushId() {
		return studentPushId;
	}

	public void setStudentPushId(String studentPushId) {
		this.studentPushId = studentPushId;
	}

	public String getCourseHour() {
		return courseHour;
	}

	public void setCourseHour(String courseHour) {
		this.courseHour = courseHour;
	}


	public String getHowHtml() {
		return howHtml;
	}
	@JSONField(serialize=false)
	public void setHowHtml(String howHtml) {
		this.howHtml = howHtml;
	}

	public String getHowIds() {
		return howIds;
	}

	public void setHowIds(String howIds) {
		this.howIds = howIds;
	}
	@JSONField(serialize=false)
	public String getHowNames() {
		return howNames;
	}

	public void setHowNames(String howNames) {
		this.howNames = howNames;
	}

	public String getTimeCost() {
		return timeCost;
	}

	public void setTimeCost(String timeCost) {
		this.timeCost = timeCost;
	}
	@JSONField(serialize=false)
	public String getTimers() {
		return timers;
	}

	public void setTimers(String timers) {
		this.timers = timers;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}
	@OneToMany(cascade = { CascadeType.REFRESH}, fetch=FetchType.EAGER)
	@JoinColumn(name="studentWorkId",updatable =false,insertable =false)
	@OrderBy(" num asc")
	@Fetch(FetchMode.SELECT)
	public List<ZuoybStudentWorkHow> getWorkHowList() {
		return workHowList;
	}

	public void setWorkHowList(List<ZuoybStudentWorkHow> workHowList) {
		this.workHowList = workHowList;
	}

	@Transient
	public List<Map<String, Object>> getShowImgList() {
		return showImgList;
	}

	public void setShowImgList(List<Map<String, Object>> showImgList) {
		this.showImgList = showImgList;
	}
	@Transient
	public List<String> getHasMastered() {
		return hasMastered;
	}

	public void setHasMastered(List<String> hasMastered) {
		this.hasMastered = hasMastered;
	}
	@Transient
	public List<String> getNotMastered() {
		return notMastered;
	}

	public void setNotMastered(List<String> notMastered) {
		this.notMastered = notMastered;
	}

	

	
	
   
}
