package basic.db.model;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import com.wasu.module.db.DBBase;

import java.io.Serializable;

@DatabaseTable(tableName = "ProgramHistory")
public class DBProgramHistory extends DBBase<DBProgramHistory>{
	public static final int SHOW_TYPE_NEWS 	= 0;
	public static final int SHOW_TYPE_MOVIE = 1;
	public static final int SHOW_TYPE_SERIES= 3;
	
	private static final long serialVersionUID = 3266503407064672166L;

	@DatabaseField(generatedId = true)
	public long id;
	
	/** 节目id **/
	@DatabaseField(defaultValue="-1",unique=true)
	public int programId;
	
	/** 节目名称 **/
	@DatabaseField()
	public String programName;
	
	/** 节目海报 **/
	@DatabaseField()
	public String programPic;
	
	/** 节目域名 **/
	@DatabaseField()
	public String domain;
	
	/**节目播放地址**/
	@DatabaseField()
	public String playUrl;
	
	/**节目详情页地址**/
	@DatabaseField()
	public String detailUrl;
	
	/** 节目所属类型  0非影视 1电影 3电视剧**/
	@DatabaseField(defaultValue="1")
	public int showType;
	
	/**上次播放影片的总时长  **/
	@DatabaseField()
	public long lastPlayTime;
	
	/**上次播放影片的总时长  **/
	@DatabaseField()
	public long duration;
	
	/** 上次播放清晰度  **/
	@DatabaseField()
	public String lastTag;
	
	/**当前播放的集数**/
	@DatabaseField(defaultValue="0")
	public int lastSeries;
	
	/**电视剧的总集数**/
	@DatabaseField(defaultValue="0")
	public int totalSeries;
	
	/**上次更新到的集数**/
	@DatabaseField(defaultValue="0")
	public int preUpdateSeries;
	
	/**目前更新到的集数**/
	@DatabaseField(defaultValue="0")
	public int updateSeries;
	
	/**最后一次被历史记录的时间**/
	@DatabaseField(defaultValue="0")
	public long savehistorytime;

    @Override
    protected DBProgramHistory getMySelf() {
        return this;
    }
	
}
