package com.bankaudit.process.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.validation.constraints.Null;

import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * @author narendar.burada
 *
 */
@Entity
@Table(name="audit_process_temp")
@DynamicInsert
@JsonIgnoreProperties(ignoreUnknown = true)
public class AuditProcessValidate implements Serializable {
	
/*Table: audit_process_temp
	-----------------------------
Field                Type          Collation          Null           Default   
-------------------  ------------  -----------------  ------         -------  
row_num                  double         (NULL)             YES             (NULL)           select,insert,update,references           
audit_status             varchar(20)    latin1_swedish_ci  NO                               select,insert,update,references           
audit_type_code          varchar(20)    latin1_swedish_ci  NO                               select,insert,update,references           
legal_entity_code        int(11)        (NULL)             NO              0                select,insert,update,references           
unit_type                varchar(50)    latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
unit_name                varchar(50)    latin1_swedish_ci  NO                               select,insert,update,references           
unit_id                  varchar(20)    latin1_swedish_ci  NO                               select,insert,update,references           
frequency                varchar(20)    latin1_swedish_ci  NO                               select,insert,update,references           
duration                 varchar(20)    latin1_swedish_ci  NO                               select,insert,update,references           
team_lead                varchar(10)    latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
member                   varchar(500)   latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
last_audit_end_date      date           (NULL)             YES             (NULL)           select,insert,update,references           
start_date               date           (NULL)             YES             (NULL)           select,insert,update,references           
end_date                 date           (NULL)             YES             (NULL)           select,insert,update,references           
criticality_desc         varchar(50)    latin1_swedish_ci  NO              (NULL)           select,insert,update,references           
remark_error_codes       varchar(55)    latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
remark_plan_ids          varchar(55)    latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
remark_audit_codes       varchar(55)    latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
remark_audit_ids         varchar(55)    latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
remark_unit_ids          varchar(55)    latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
remark_desc              varchar(500)   latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
plan_start_date          date           (NULL)             YES             (NULL)           select,insert,update,references           
plan_end_date            date           (NULL)             YES             (NULL)           select,insert,update,references           
remark_row_num           varchar(55)    latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
man_days                 varchar(20)    latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
audit_id                 varchar(20)    latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
maker                    varchar(20)    latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
remark_user_ids          varchar(500)   latin1_swedish_ci  YES             (NULL)           select,insert,update,references           
remark_sub_group         int(11)        (NULL)             YES             (NULL)           select,insert,update,references           
remark_sub_group_colour  char(1)        latin1_swedish_ci  YES             G                select,insert,update,references           
plan_comments            varchar(1024)  latin1_swedish_ci  YES             (NULL)           select,insert,update,references
*/
	
	@Id	
	@Column(name="row_num")
	private long rowNum;

	
	@Column(name="audit_id")
	private String auditId;
	
	@Column(name="audit_Status")
	private String auditStatus;
	
	@Id
	@Column(name="legal_entity_code")
	private int legalEntityCode;
	
	public String getManDays() {
		return manDays;
	}

	public void setManDays(String manDays) {
		this.manDays = manDays;
	}

	@Column(name="unit_type")
	private String unitType;
	
	@Column(name="unit_name")
	private String unitName;
		
	@Column(name="unit_id")
	private String unitId;
	
	@Column(name="frequency")
	private String frequency;
	
	@Column(name="man_days")
	private String manDays;

	@Column(name="duration")
	private Integer duration;
	
	@Column(name="response_time")
	private String responseTime;
	
	@Column(name="closure_time")
	private String closureTime;
	
	@Column(name="team_lead")
	private String teamLead;
	
	@Column(name="member" )
	private String member;
	
	@Temporal(TemporalType.DATE)
	@Column(name="last_audit_end_date")
	private Date lastAuditEndDate;
		
	@Temporal(TemporalType.DATE)
	@Column(name="start_date")
	private Date startDate;

	@Temporal(TemporalType.DATE)
	@Column(name="end_date")
	private Date endDate;

	@Column(name="criticality_desc")
	private String criticalityDesc;
	
	@Id
	@Column(name="audit_type_code")
	private String auditTypeCode;
	
	@Column(name="remark_error_codes")
	private String remarkErrorCodes;
	
	@Column(name="remark_sub_group")
	private String remarkSubGroup;
	
	@Column(name="remark_plan_ids")
	private String remarkPlanIds;
	
	@Column(name="remark_audit_codes")
	private String remarkAuditCodes;
	
	@Column(name="remark_audit_ids")
	private String remarkAuditIds;
	
	@Column(name="remark_unit_ids")
	private String remarkUnitIds;
	
	@Column(name="remark_desc")
	private String remarkDesc;
	
	@Temporal(TemporalType.DATE)
	@Column(name="plan_start_date")
	private Date planStartDate;	
	
	@Temporal(TemporalType.DATE)
	@Column(name="plan_end_date")
	private Date planEndDate;
	
	private transient String teamMember;
	
	public char getRemarkSubGroupColour() {
		return remarkSubGroupColour;
	}

	public void setRemarkSubGroupColour(char remarkSubGroupColour) {		
		this.remarkSubGroupColour = remarkSubGroupColour;
	}

	@Column(name="remark_row_num")
	private String remarkRowNum;

	@Column(name="maker")
	private String maker; 
	
	@Column(name="remark_sub_group_colour", insertable=false)
	@ColumnDefault("G")
	private char remarkSubGroupColour; 
	
	@Column(name="plan_comments")
	private String planComments; 
	
	@Column(name="plan_audit_remarks", insertable=false)
	private String planAuditRemarks;
	
	public String getPlanComments() {
		return planComments;
	}

	public void setPlanComments(String planComments) {
		this.planComments = planComments;
	}

	public String getMaker() {
		return maker;
	}

	public void setMaker(String maker) {
		this.maker = maker;
	}

	public long getRowNum() {
		return rowNum;
	}

	public void setRowNum(long rowNum) {
		this.rowNum = rowNum;
	}

	public String getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(String auditStatus) {
		this.auditStatus = auditStatus;
	}

	public int getLegalEntityCode() {
		return legalEntityCode;
	}

	public void setLegalEntityCode(int legalEntityCode) {
		this.legalEntityCode = legalEntityCode;
	}

	public String getUnitType() {
		return unitType;
	}

	public void setUnitType(String unitType) {
		this.unitType = unitType;
	}

	public String getUnitName() {
		return unitName;
	}

	public void setUnitName(String unitName) {
		this.unitName = unitName;
	}

	public String getUnitId() {
		return unitId;
	}

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

	public String getFrequency() {
		return frequency;
	}

	public void setFrequency(String frequency) {
		this.frequency = frequency;
	}

	public Integer getDuration() {
		return duration;
	}

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

	public String getResponseTime() {
		return responseTime;
	}

	public void setResponseTime(String responseTime) {
		this.responseTime = responseTime;
	}

	public String getClosureTime() {
		return closureTime;
	}

	public void setClosureTime(String closureTime) {
		this.closureTime = closureTime;
	}

	public String getTeamLead() {
		return teamLead;
	}

	public void setTeamLead(String teamLead) {
		this.teamLead = teamLead;
	}

	public String getMember() {
		return member;
	}

	public void setMember(String member) {
		this.member = member;
	}
	
	
	public Date getLastAuditEndDate() {
		return lastAuditEndDate;
	}

	public void setLastAuditEndDate(Date lastAuditEndDate) {
		this.lastAuditEndDate = lastAuditEndDate;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getCriticalityDesc() {
		return criticalityDesc;
	}

	public void setCriticalityDesc(String criticalityDesc) {
		this.criticalityDesc = criticalityDesc;
	}

	public String getAuditTypeCode() {
		return auditTypeCode;
	}

	public void setAuditTypeCode(String auditTypeCode) {
		this.auditTypeCode = auditTypeCode;
	}

	public String getRemarkErrorCodes() {
		return remarkErrorCodes;
	}

	public String getAuditId() {
		return auditId;
	}

	public void setAuditId(String auditId) {
		this.auditId = auditId;
	}

	public void setRemarkErrorCodes(String remarkErrorCodes) {
		this.remarkErrorCodes = remarkErrorCodes;
	}

	public String getRemarkPlanIds() {
		return remarkPlanIds;
	}

	public void setRemarkPlanIds(String remarkPlanIds) {
		this.remarkPlanIds = remarkPlanIds;
	}

	public String getRemarkAuditCodes() {
		return remarkAuditCodes;
	}

	public void setRemarkAuditCodes(String remarkAuditCodes) {
		this.remarkAuditCodes = remarkAuditCodes;
	}

	public String getRemarkAuditIds() {
		return remarkAuditIds;
	}

	public void setRemarkAuditIds(String remarkAuditIds) {
		this.remarkAuditIds = remarkAuditIds;
	}

	public String getRemarkUnitIds() {
		return remarkUnitIds;
	}

	public void setRemarkUnitIds(String remarkUnitIds) {
		this.remarkUnitIds = remarkUnitIds;
	}

	public String getRemarkDesc() {
		return remarkDesc;
	}

	public void setRemarkDesc(String remarkDesc) {
		this.remarkDesc = remarkDesc;
	}

	public Date getPlanStartDate() {
		return planStartDate;
	}

	public void setPlanStartDate(Date planStartDate) {
		this.planStartDate = planStartDate;
	}

	public Date getPlanEndDate() {
		return planEndDate;
	}

	public void setPlanEndDate(Date planEndDate) {
		this.planEndDate = planEndDate;
	}

	public String getRemarkRowNum() {
		return remarkRowNum;
	}

	public void setRemarkRowNum(String remarkRowNum) {
		this.remarkRowNum = remarkRowNum;
	}

	public String getRemarkSubGroup() {
		return remarkSubGroup;
	}

	public void setRemarkSubGroup(String remarkSubGroup) {
		this.remarkSubGroup = remarkSubGroup;
	}
	
	public String getPlanAuditRemarks() {
		return planAuditRemarks;
	}

	public void setPlanAuditRemarks(String planAuditRemarks) {
		this.planAuditRemarks = planAuditRemarks;
	}

	public String getTeamMember() {
		return teamMember;
	}

	public void setTeamMember(String teamMember) {
		this.teamMember = teamMember;
	}

	@Override
	public String toString() {
		return "AuditProcessValidate [rowNum=" + rowNum + ", auditId=" + auditId + ", auditStatus=" + auditStatus
				+ ", legalEntityCode=" + legalEntityCode + ", unitType=" + unitType + ", unitName=" + unitName
				+ ", unitId=" + unitId + ", frequency=" + frequency + ", manDays=" + manDays + ", duration=" + duration
				+ ", teamLead=" + teamLead + ", member=" + member + ", lastAuditEndDate=" + lastAuditEndDate
				+ ", startDate=" + startDate + ", endDate=" + endDate + ", criticalityDesc=" + criticalityDesc
				+ ", auditTypeCode=" + auditTypeCode + ", remarkErrorCodes=" + remarkErrorCodes + ", remarkSubGroup="
				+ remarkSubGroup + ", remarkPlanIds=" + remarkPlanIds + ", remarkAuditCodes=" + remarkAuditCodes
				+ ", remarkAuditIds=" + remarkAuditIds + ", remarkUnitIds=" + remarkUnitIds + ", remarkDesc="
				+ remarkDesc + ", planStartDate=" + planStartDate + ", planEndDate=" + planEndDate + ", remarkRowNum="
				+ remarkRowNum + ", maker=" + maker + ", remarkSubGroupColour=" + remarkSubGroupColour
				+ ", planComments=" + planComments + ", planAuditRemarks=" + planAuditRemarks + "]";
	}



	
	
}
