package kr.gmtc.tss.data.vo;

import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.List;

import org.apache.ibatis.javassist.compiler.ast.Keyword;

import com.fasterxml.jackson.annotation.JsonProperty;

public class CctvTrackVO implements Comparable<CctvTrackVO> {

	private boolean inserted=false;

	public long timeStamp = LocalDateTime.now().toInstant(ZoneOffset.ofHours(9)).toEpochMilli();
	
	public CctvTrackVO() {
	}

	protected LocalDateTime dateTime;
	
	@JsonProperty("dtct_tm")
	private String dtctTm;

	@JsonProperty("dtct_cls")
	private String dtctCls;

	@JsonProperty("mta_tm")
	private String mtaTm;

	@JsonProperty("rw_tm")
	private String rwTm;
	
	@JsonProperty("cc_id")
	private List<String> ccId;

	@JsonProperty("zn_id")
	private String znId;

	@JsonProperty("arcrft_tp")
	private String arcrftTp;

	@JsonProperty("arln")
	private String arln;

	@JsonProperty("trck_id")
	private String trckId;

	@JsonProperty("bb_tlp")
	private List<String> bbTlp;

	@JsonProperty("bb_brp")
	private List<String> bbBrp;

	@JsonProperty("crd_frm")
	private List<String> crdFrm;

	@JsonProperty("crd_glbl")
	private List<String> crdGlbl;

	@JsonProperty("drctn")
	private String drctn;

	@JsonProperty("arcrft_stnd")
	private String arcrftStnd;

	@JsonProperty("spd")
	private String spd;

	

	@Override
	public String toString() {
		return "TrackVO [inserted=" + inserted + ", timeStamp=" + timeStamp + ", dateTime=" + dateTime + ", dtctTm="
				+ dtctTm + ", dtctCls=" + dtctCls + ", mtaTm=" + mtaTm + ", rwTm=" + rwTm + ", ccId=" + ccId + ", znId="
				+ znId + ", arcrftTp=" + arcrftTp + ", arln=" + arln + ", trckId=" + trckId + ", bbTlp=" + bbTlp
				+ ", bbBrp=" + bbBrp + ", crdFrm=" + crdFrm + ", crdGlbl=" + crdGlbl + ", drctn=" + drctn
				+ ", arcrftStnd=" + arcrftStnd + ", spd=" + spd + "]";
	}

	public String toDataFormat(List<String> arr) {
		int j = 0;
		String s = "";
		for (String k : arr) {
			if (j > 0) s += "$"; 
			s += k;
			j++;
		}
		
		return s;
	}
	

	public boolean isInserted() {
		return inserted;
	}



	public void setInserted(boolean inserted) {
		this.inserted = inserted;
	}



	public long getTimeStamp() {
		return timeStamp;
	}



	public void setTimeStamp(long timeStamp) {
		this.timeStamp = timeStamp;
	}



	public LocalDateTime getDateTime() {
		return dateTime;
	}



	public void setDateTime(LocalDateTime dateTime) {
		this.dateTime = dateTime;
	}



	public String getDtctTm() {
		return dtctTm;
	}



	public void setDtctTm(String dtctTm) {
		this.dtctTm = dtctTm;
	}



	public String getDtctCls() {
		return dtctCls;
	}



	public void setDtctCls(String dtctCls) {
		this.dtctCls = dtctCls;
	}



	public String getMtaTm() {
		return mtaTm;
	}



	public void setMtaTm(String mtaTm) {
		this.mtaTm = mtaTm;
	}



	public String getRwTm() {
		return rwTm;
	}



	public void setRwTm(String rwTm) {
		this.rwTm = rwTm;
	}



	public List<String> getCcId() {
		return ccId;
	}



	public void setCcId(List<String> ccId) {
		this.ccId = ccId;
	}



	public String getZnId() {
		return znId;
	}



	public void setZnId(String znId) {
		this.znId = znId;
	}



	public String getArcrftTp() {
		return arcrftTp;
	}



	public void setArcrftTp(String arcrftTp) {
		this.arcrftTp = arcrftTp;
	}



	public String getArln() {
		return arln;
	}



	public void setArln(String arln) {
		this.arln = arln;
	}



	public String getTrckId() {
		return trckId;
	}



	public void setTrckId(String trckId) {
		this.trckId = trckId;
	}



	public List<String> getBbTlp() {
		return bbTlp;
	}



	public void setBbTlp(List<String> bbTlp) {
		this.bbTlp = bbTlp;
	}



	public List<String> getBbBrp() {
		return bbBrp;
	}



	public void setBbBrp(List<String> bbBrp) {
		this.bbBrp = bbBrp;
	}



	public List<String> getCrdFrm() {
		return crdFrm;
	}



	public void setCrdFrm(List<String> crdFrm) {
		this.crdFrm = crdFrm;
	}



	public List<String> getCrdGlbl() {
		return crdGlbl;
	}



	public void setCrdGlbl(List<String> crdGlbl) {
		this.crdGlbl = crdGlbl;
	}



	public String getDrctn() {
		return drctn;
	}



	public void setDrctn(String drctn) {
		this.drctn = drctn;
	}



	public String getArcrftStnd() {
		return arcrftStnd;
	}



	public void setArcrftStnd(String arcrftStnd) {
		this.arcrftStnd = arcrftStnd;
	}



	public String getSpd() {
		return spd;
	}



	public void setSpd(String spd) {
		this.spd = spd;
	}



	@Override
    public boolean equals(Object obj) {
        //p1.equals(p2)
        if(obj instanceof CctvTrackVO) {
        	CctvTrackVO p = (CctvTrackVO)obj;
            return this.hashCode()==p.hashCode(); 
            
        }
        return false;
    }

	@Override
	public int compareTo(CctvTrackVO o) {
		return 0;
	}
	
	
}
