package com.bankaudit.model;

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

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="maint_audit_parameter")
public class MaintAuditParameter implements Serializable{ 

	/*Table: maint_audit_parameter
	
	Column Information
	Field                   Type         Collation          Null    Key     Default            Extra                        Privileges                       Comment  
	----------------------  -----------  -----------------  ------  ------  -----------------  ---------------------------  -------------------------------  ---------
	legal_entity_code       int(2)        (NULL)             NO      MUL     (NULL)                                          select,insert,update,references           
	id                      int(4)        (NULL)             NO      PRI     (NULL)             auto_increment               select,insert,update,references           
	audit_type_code         varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	u_criticality           varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	unit_type               varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	classification          varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	rating                  varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	revenue_leakage         varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	frequency               varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	duration                varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	man_days                varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	response_time           varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	auth_rej_remarks        varchar(200)  latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	entity_status           varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	status                  varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	maker                   varchar(20)   latin1_swedish_ci  NO              (NULL)                                          select,insert,update,references           
	maker_timestamp         timestamp     (NULL)             NO              CURRENT_TIMESTAMP  on update CURRENT_TIMESTAMP  select,insert,update,references           
	checker                 varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references           
	checker_timestamp       timestamp     (NULL)             YES             (NULL)                                          select,insert,update,references           
	businessdate_timestamp  timestamp     (NULL)             YES             (NULL)                                          select,insert,update,references           
	sysdate_timestamp       timestamp     (NULL)             YES             (NULL)                                          select,insert,update,references           
	frequency_type          varchar(20)   latin1_swedish_ci  YES             (NULL)                                          select,insert,update,references  
	*/
	
	
	

	@Column(name="legal_entity_code")
	private Integer legalEntityCode;
	
	@Column(name="audit_type_code")
	private String auditTypeCode;
	
	@Id
	//@GeneratedValue(strategy = javax.persistence.GenerationType.IDENTITY)
	@Column(name = "id", updatable = false, nullable = false)
	private Integer id;
	
	
	@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
    @JoinColumns({
        @JoinColumn(updatable=false,insertable=false, name="legal_entity_code", referencedColumnName="legal_entity_code"),
        @JoinColumn(updatable=false,insertable=false, name="audit_type_code", referencedColumnName="audit_type_code")        
    })
	private MaintAuditTypeDesc maintAuditTypeDesc;
		
	@Column(name="u_criticality", nullable = true)
	private String uCriticality;
	
	@Column(name="unit_type", nullable = true)
	private String unitType;
	
	@Column(name="classification", nullable = true)
	private String classification;
	
	@Column(name="frequency_type")
	private String frequencyType;
	
	@Column(name="frequency")
	private String frequency;
	
	@Column(name="duration")
	private String duration;
	
	@Column(name="man_days")
	private String manDays;
		
	@Column(name="response_time", nullable = true)
	private String responseTime;
	
	@Column(name="rating", nullable = true)
	private String rating;
	
	@Column(name="revenue_leakage", nullable = true)
	private String revenueLeakage;	
	
	@Column(name="closure_time")
	private String closureTime;
	
	@Column(name = "entity_status")
	private String entityStatus;
	
	@Column(name="status")
	private String status;
	
	@Column(name="auth_rej_remarks")
	private String authRejRemarks;	
				
	@Column(name="maker")
	private String maker;
	
	@Column(name="maker_timestamp")
	private Date makerTimestamp;
	
	@Column(name="checker")
	private String checker;
	
	@Column(name="checker_timestamp")
	private Date checkerTimestamp;
	
	@Column(name="businessdate_timestamp")
	private Date businessdateTimestamp;
	
	@Column(name="sysdate_timestamp")
	private Date sysdateTimestamp;
	
	public Integer getLegalEntityCode() {
		return legalEntityCode;
	}

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

	public String getAuditTypeCode() {
		return auditTypeCode;
	}

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

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public MaintAuditTypeDesc getMaintAuditTypeDesc() {
		return maintAuditTypeDesc;
	}

	public void setMaintAuditTypeDesc(MaintAuditTypeDesc maintAuditTypeDesc) {
		this.maintAuditTypeDesc = maintAuditTypeDesc;
	}

	public String getuCriticality() {
		return uCriticality;
	}

	public void setuCriticality(String uCriticality) {
		this.uCriticality = uCriticality;
	}

	public String getUnitType() {
		return unitType;
	}

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

	public String getClassification() {
		return classification;
	}

	public void setClassification(String classification) {
		this.classification = classification;
	}

	public String getFrequencyType() {
		return frequencyType;
	}

	public void setFrequencyType(String frequencyType) {
		this.frequencyType = frequencyType;
	}

	public String getFrequency() {
		return frequency;
	}

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

	public String getDuration() {
		return duration;
	}

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

	public String getManDays() {
		return manDays;
	}

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

	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 getRating() {
		return rating;
	}

	public void setRating(String rating) {
		this.rating = rating;
	}

	public String getRevenueLeakage() {
		return revenueLeakage;
	}

	public void setRevenueLeakage(String revenueLeakage) {
		this.revenueLeakage = revenueLeakage;
	}

	public String getEntityStatus() {
		return entityStatus;
	}

	public void setEntityStatus(String entityStatus) {
		this.entityStatus = entityStatus;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getAuthRejRemarks() {
		return authRejRemarks;
	}

	public void setAuthRejRemarks(String authRejRemarks) {
		this.authRejRemarks = authRejRemarks;
	}

	public String getMaker() {
		return maker;
	}

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

	public Date getMakerTimestamp() {
		return makerTimestamp;
	}

	public void setMakerTimestamp(Date makerTimestamp) {
		this.makerTimestamp = makerTimestamp;
	}

	public String getChecker() {
		return checker;
	}

	public void setChecker(String checker) {
		this.checker = checker;
	}

	public Date getCheckerTimestamp() {
		return checkerTimestamp;
	}

	public void setCheckerTimestamp(Date checkerTimestamp) {
		this.checkerTimestamp = checkerTimestamp;
	}

	public Date getBusinessdateTimestamp() {
		return businessdateTimestamp;
	}

	public void setBusinessdateTimestamp(Date businessdateTimestamp) {
		this.businessdateTimestamp = businessdateTimestamp;
	}

	public Date getSysdateTimestamp() {
		return sysdateTimestamp;
	}

	public void setSysdateTimestamp(Date sysdateTimestamp) {
		this.sysdateTimestamp = sysdateTimestamp;
	}

	@Override
	public String toString() {
		return "MaintAuditParameter [legalEntityCode=" + legalEntityCode + ", auditTypeCode=" + auditTypeCode + ", id="
				+ id + ", maintAuditTypeDesc=" + maintAuditTypeDesc + ", uCriticality=" + uCriticality + ", unitType="
				+ unitType + ", classification=" + classification + ", frequencyType=" + frequencyType + ", frequency="
				+ frequency + ", duration=" + duration + ", manDays=" + manDays + ", responseTime=" + responseTime
				+ ", rating=" + rating + ", revenueLeakage=" + revenueLeakage + ", entityStatus=" + entityStatus
				+ ", status=" + status + ", authRejRemarks=" + authRejRemarks + ", maker=" + maker + ", makerTimestamp="
				+ makerTimestamp + ", checker=" + checker + ", checkerTimestamp=" + checkerTimestamp
				+ ", businessdateTimestamp=" + businessdateTimestamp + ", sysdateTimestamp=" + sysdateTimestamp + "]";
	}

	

	

}
