package com.wisedu.mooc.app.study.bo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;

import javax.persistence.Id;
import javax.persistence.Table;

/**
 * UserStudy entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "mooc_user_study")
public class UserStudy implements java.io.Serializable {
	/**
	 * 序列
	 */
	private static final long serialVersionUID = 1L;
	// Fields
	private Long sid;
	private Long unitId;
	private Long itemId;
	private Long userId;
	private Date firstDate;
	private Long currentPosition;
	private Long maxPosition;
	private Long duration;
	private Integer isOver;
	private Long firstTimedate;
	
	/**
	 * 已学完
	 */
	public static final Integer IS_OVER_YES = 2;
	
	/**
	 * 学习中
	 */
	public static final Integer IS_OVER_NO = 1;

	// Constructors

	/** default constructor */
	public UserStudy() {
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "SID", unique = true, nullable = false)
	public Long getSid() {
		return this.sid;
	}

	public void setSid(Long sid) {
		this.sid = sid;
	}


	@Column(name = "UNIT_ID")
	public Long getUnitId() {
		return this.unitId;
	}

	public void setUnitId(Long unitId) {
		this.unitId = unitId;
	}

	@Column(name = "ITEM_ID")
	public Long getItemId() {
		return this.itemId;
	}

	public void setItemId(Long itemId) {
		this.itemId = itemId;
	}

	@Column(name = "USER_ID")
	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	@Column(name = "FIRST_DATE", length = 19)
	public Date getFirstDate() {
		return this.firstDate;
	}

	public void setFirstDate(Date firstDate) {
		this.firstDate = firstDate;
	}

	@Column(name = "CURRENT_POSITION")
	public Long getCurrentPosition() {
		return this.currentPosition;
	}

	public void setCurrentPosition(Long currentPosition) {
		this.currentPosition = currentPosition;
	}

	@Column(name = "MAX_POSITION")
	public Long getMaxPosition() {
		return this.maxPosition;
	}

	public void setMaxPosition(Long maxPosition) {
		this.maxPosition = maxPosition;
	}

	@Column(name = "DURATION")
	public Long getDuration() {
		return this.duration;
	}

	public void setDuration(Long duration) {
		this.duration = duration;
	}

	@Column(name = "IS_OVER")
	public Integer getIsOver() {
		return this.isOver;
	}

	public void setIsOver(Integer isOver) {
		this.isOver = isOver;
	}

	@Column(name = "FIRST_TIMEDATE")
	public Long getFirstTimedate() {
		return this.firstTimedate;
	}

	public void setFirstTimedate(Long firstTimedate) {
		this.firstTimedate = firstTimedate;
	}

}