package com.ssj.bean.weixin.story.bean;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
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 org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

import com.alibaba.fastjson.annotation.JSONField;
import com.ssj.bean.common.framework.core.domain.BaseEntity;
import com.ssj.bean.weixin.libmy.domain.TbJxyReadIn;

/** 
 * @author  ZhangCaibao 
 * @version 2017年6月12日 上午11:53:40 
 * 类说明 
 */
@Entity
@Table(name = "tb_story_task")
public class StoryTask extends BaseEntity{
    /**
	 * 
	 */
	private static final long serialVersionUID = -4721041256601205032L;
	/**
     * 标题
     */
	private String title;
	/**
	 * 标题时长
	 */
	private String titleLong;
	/**
	 * 图片标题
	 */
	private String imgTitle;
	/**
	 * 语音标题
	 */
	private String voiceTitle;
	/**
	 * 语音
	 */
	private String voice;
	/**
	 *  任务
	 */
	private String taskName;
	/**
	 * 第几天，
	 */
	private Integer daysNum;
	
	private String storyId;
	
	private String qrCode;
	/**
	 * 回复头部
	 */
	private String replyTitle;
	/**
	 * 古诗目标
	 */
	private String gsAims;
	/**
	 * 古诗正文
	 */
	private String gsText;
	/**
	 * 古诗注释
	 */
	private String gsNote;
	/**
	 * 古诗翻译
	 */
	private String gsFanyi;
	
	/**
	 * 关联图片
	 */
	private List<StoryImg> imglist = new ArrayList<StoryImg>();
	
	/**
	 * 关联共读
	 */
	private List<TbJxyReadIn> inList = new ArrayList<TbJxyReadIn>();
	
	/**
	 * 第几周
	 */
	private Integer num;
	/**
	 * 周封面
	 */
	private String coverImg;
	/**
	 * 周封面说明
	 */
	private String coverName;

	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getTitleLong() {
		return titleLong;
	}
	public void setTitleLong(String titleLong) {
		this.titleLong = titleLong;
	}
	public String getImgTitle() {
		return imgTitle;
	}
	public void setImgTitle(String imgTitle) {
		this.imgTitle = imgTitle;
	}
	public String getVoiceTitle() {
		return voiceTitle;
	}
	public void setVoiceTitle(String voiceTitle) {
		this.voiceTitle = voiceTitle;
	}
	public String getVoice() {
		return voice;
	}
	public void setVoice(String voice) {
		this.voice = voice;
	}
	@JSONField(serialize=false)
	public String getTaskName() {
		return taskName;
	}
	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}
	public Integer getDaysNum() {
		return daysNum;
	}
	public void setDaysNum(Integer daysNum) {
		this.daysNum = daysNum;
	}
	public String getStoryId() {
		return storyId;
	}
	public void setStoryId(String storyId) {
		this.storyId = storyId;
	}
	@OneToMany(cascade = { CascadeType.REFRESH}, fetch=FetchType.EAGER)
	@JoinColumn(name="objectId",updatable =false,insertable =false)
	@OrderBy(" num ASC")
	@Fetch(FetchMode.SUBSELECT)
	public List<StoryImg> getImglist() {
		return imglist;
	}
	public void setImglist(List<StoryImg> imglist) {
		this.imglist = imglist;
	}
	public String getQrCode() {
		return qrCode;
	}
	public void setQrCode(String qrCode) {
		this.qrCode = qrCode;
	}
	@JSONField(serialize=false)
	public String getReplyTitle() {
		return replyTitle;
	}
	public void setReplyTitle(String replyTitle) {
		this.replyTitle = replyTitle;
	}
	
	@OneToMany(cascade = { CascadeType.REFRESH}, fetch=FetchType.EAGER)
	@JoinColumn(name="isbn13",updatable =false,insertable =false)
	@OrderBy(" createTime DESC")
	@Fetch(FetchMode.SUBSELECT)
	public List<TbJxyReadIn> getInList() {
		return inList;
	}
	public void setInList(List<TbJxyReadIn> inList) {
		this.inList = inList;
	}
	@JoinColumn(updatable =false,insertable =false)
	public Integer getNum() {
		return num;
	}
	public void setNum(Integer num) {
		this.num = num;
	}
	@JoinColumn(updatable =false,insertable =false)
	public String getCoverImg() {
		return coverImg;
	}
	public void setCoverImg(String coverImg) {
		this.coverImg = coverImg;
	}
	@JoinColumn(updatable =false,insertable =false)
	public String getCoverName() {
		return coverName;
	}
	public void setCoverName(String coverName) {
		this.coverName = coverName;
	}
	public String getGsAims() {
		return gsAims;
	}
	public void setGsAims(String gsAims) {
		this.gsAims = gsAims;
	}
	public String getGsText() {
		return gsText;
	}
	public void setGsText(String gsText) {
		this.gsText = gsText;
	}
	public String getGsNote() {
		return gsNote;
	}
	public void setGsNote(String gsNote) {
		this.gsNote = gsNote;
	}
	public String getGsFanyi() {
		return gsFanyi;
	}
	public void setGsFanyi(String gsFanyi) {
		this.gsFanyi = gsFanyi;
	}
	
	
	
}
