package com.dacrt.SBIABackend.security.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.springframework.lang.NonNull;

@Entity
@Table(name = "audit",schema = "main")
public class Audit {
	
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	
	@NonNull
	@Column(columnDefinition = "timestamp without time zone NOT NULL default now()")
	private Date createdat;
	
	@NotNull
	private String module;
	
	@NotNull
	private String dsc;
	
	@NotNull
	private String ipaddr;
	
	@NotNull
	private String userref;
	
	public Audit() {
	}

	
	public Audit(@NotNull Date createdat, @NotNull String module, @NotNull String dsc, @NotNull String ipaddr,String userref) {
		super();
		this.createdat = createdat;
		this.module = module;
		this.dsc = dsc;
		this.ipaddr = ipaddr;
		this.userref = userref;
	}

	public Integer getId() {
		return id;
	}

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

	public Date getCreatedat() {
		return createdat;
	}

	public void setCreatedat(Date createdat) {
		this.createdat = createdat;
	}

	public String getModule() {  
		return module;
	}

	public void setModule(String module) {
		this.module = module;
	}
	
	public String getDsc() {
		return dsc;
	}

	public void setDsc(String dsc) {
		this.dsc = dsc;
	}

	public String getIpaddr() {
		return ipaddr;
	}

	public void setIpaddr(String ipaddr) {
		this.ipaddr = ipaddr;
	}
	
	public String getUserref() {
		return userref;
	}

	public void setUserref(String userref) {
		this.userref = userref;
	}

}