package com.ekexiu.portal.po;

import org.jfw.apt.orm.annotation.entry.Column;
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
import org.jfw.apt.orm.annotation.entry.Table;
import org.jfw.apt.orm.annotation.entry.Unique;
import org.jfw.apt.orm.annotation.entry.Uniques;
import org.jfw.apt.orm.core.defaultImpl.WIntHandler;
import org.jfw.apt.orm.core.enums.DE;

import com.ekexiu.portal.basepo.CreateTimeSupported;
import com.ekexiu.portal.pojo.EditProfessor;

@Uniques(@Unique(clolumns = { "professorId","watchObject","watchType" }, name = "WATCH_RELATION_UQ"))
@PrimaryKey({"professorId","watchObject"})
@Table
public class Watch implements CreateTimeSupported {
	private String professorId;
	private String watchObject;
	private String createTime;
	private Integer watchType;
	private EditProfessor professor;
	private Resource resource;
	
	public EditProfessor getProfessor() {
		return professor;
	}
	public void setProfessor(EditProfessor professor) {
		this.professor = professor;
	}
	public Resource getResource() {
		return resource;
	}
	public void setResource(Resource resource) {
		this.resource = resource;
	}
	
	@Column(DE.id_32)
	public String getProfessorId() {
		return professorId;
	}
	public void setProfessorId(String professorId) {
		this.professorId = professorId;
	}
	
	@Column(DE.id_32)
	public String getWatchObject() {
		return watchObject;
	}
	public void setWatchObject(String watchObject) {
		this.watchObject = watchObject;
	}
	
	public String getCreateTime() {
		return createTime;
	}
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	
	@Column(handlerClass=WIntHandler.class,dbType="INT",insertable=true,nullable=false,renewable=true,queryable=true)
	public Integer getWatchType() {
		return watchType;
	}
	public void setWatchType(Integer watchType) {
		this.watchType = watchType;
	}
	
}
