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

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

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/** 
 * @author  ZhangCaibao 
 * @version 2017年3月22日 下午1:38:52 
 * 图片 
 */
@Entity
@Table(name = "zyb_student_work_img")
public class ZuoybStudentWorkImg extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7534711287214180081L;
    /**
     * objectid
     */
	private String  objectId;
	/**
	 * 图片地址
	 */
	private String img;
	/**
	 * 操作时间
	 */
	private Date createTime;
	
	private Integer num;
	
    private String name;
    /** 
     * 错题描述
     */
    private String wrongTitle;
    /**
     * 坐标
     */
    private String coordinate;
    /**
     * 本地
     */
    private String imgagesLocalId;
    /**
     * 服务器
     */
    private String imgagesServerId;

	/**
	 * 第几张作业
	 */
	private Integer workNum;

	/**
	 * 第几道错题
	 */
	private String listNum;

	/**
	 * 第几行
	 */
	private Integer lineNum;

	/**
	 * 第几列
	 */
	private Integer columnNum;

	/**
	 * 图片id
	 */
	private String homeworkPictureId;
   
    /**
     * 1错题，2作业题目
     */
    private Integer type;
    /**
     * 图片对应的知识点ID
     */
    private  String howDetailsId;
    @JSONField(serialize=false)
	public String getObjectId() {
		return objectId;
	}
	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}
	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	@Column(updatable = false) 
	@JSONField(serialize=false)
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Integer getNum() {
		return num;
	}
	public void setNum(Integer num) {
		this.num = num;
	}
	@JSONField(serialize=false)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@JSONField(serialize=false)
	public String getWrongTitle() {
		return wrongTitle;
	}
	public void setWrongTitle(String wrongTitle) {
		this.wrongTitle = wrongTitle;
	}
	@JSONField(serialize=false)
	public String getCoordinate() {
		return coordinate;
	}
	public void setCoordinate(String coordinate) {
		this.coordinate = coordinate;
	}
	@Transient
	@JSONField(serialize=false)
	public String getImgagesLocalId() {
		return imgagesLocalId;
	}
	public void setImgagesLocalId(String imgagesLocalId) {
		this.imgagesLocalId = imgagesLocalId;
	}
	@Transient
	@JSONField(serialize=false)
	public String getImgagesServerId() {
		return imgagesServerId;
	}
	public void setImgagesServerId(String imgagesServerId) {
		this.imgagesServerId = imgagesServerId;
	}
	@JSONField(serialize=false)
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	@JSONField(serialize=false)
	public String getHowDetailsId() {
		return howDetailsId;
	}
	public void setHowDetailsId(String howDetailsId) {
		this.howDetailsId = howDetailsId;
	}


	@Column(name = "homework_picture_id")
	public String getHomeworkPictureId() {
		return homeworkPictureId;
	}

	public void setHomeworkPictureId(String homeworkPictureId) {
		this.homeworkPictureId = homeworkPictureId;
	}

	@Column(name = "work_num")
	 public Integer getWorkNum() {
		return workNum;
	}
	public void setWorkNum(Integer workNum) {
		this.workNum = workNum;
	}
	@Column(name = "list_num")
	public String getListNum() {
		return listNum;
	}
	public void setListNum(String listNum) {
		this.listNum = listNum;
	}

	@Column(name = "line_num")
	public Integer getLineNum() {
		return lineNum;
	}

	public void setLineNum(Integer lineNum) {
		this.lineNum = lineNum;
	}

	@Column(name = "column_num")
	public Integer getColumnNum() {
		return columnNum;
	}

	public void setColumnNum(Integer columnNum) {
		this.columnNum = columnNum;
	}

	@Override
	 public boolean equals(Object obj) {
	        if(obj==null){
	            return false;
	        }
	        if(this==obj){
	            return true;
	        }
	        if(obj instanceof ZuoybStudentWorkImg){
	        	ZuoybStudentWorkImg img=(ZuoybStudentWorkImg)obj;
	        	if(img.objectId==null){
	        		return false;
	        	}
	        	if(img.objectId.equals(this.objectId)&&img.img.equals(this.img)){
	        		return true;
	        	}else{
	        		return false;
	        	}
	        	
	        }
	        return false;
	  }
	 
}
