package com.its.pis.entity;

import com.its.app.utils.SysUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
public class TbPisInfrStts {

	private String PIS_NMBR;
	private String UPDT_DT;
	private String CMNC_STTS_CD;
	private String CONN_DT;
	private String DIS_CONN_DT;

	public TbPisInfrStts() {
		initStts(false);
	}
	
	public void initStts(boolean isConnected) {
		String CMNC_STTS_CD = isConnected ? "CMS0" : "CMS1";
		
		this.UPDT_DT       = SysUtils.getSysTime();
		this.CMNC_STTS_CD  = CMNC_STTS_CD;
//		if (this.CONN_DT == null) this.CONN_DT = "";
//		if (this.DIS_CONN_DT == null) this.DIS_CONN_DT = "";
	}
}
