package com.its.op.config;

import com.its.utils.SysUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Slf4j
@Getter
@Setter
@ToString
@Configuration
@ConfigurationProperties(prefix = "application.process")
public class ApplicationConfig {

    private String bootingDateTime;
    private boolean startSchedule;

    private String id = "OPER00";
    private String name = "ITS Operating Server";
//    private boolean prepared = true;
//    private String crontab = "10 0/5 * * * *";

    private String centerId = "L08";
    private String regionCode = "228";
    private String regionName = "평택시";

    private String vdsServerId = "VDS01";
    private String vmsServerId = "VMS01";
    private String dsrcServerId = "DSRC01";
    private String cctvServerId = "CTV01";
    private String trafServerId = "UTP01";

    @PostConstruct
    private void init() {
        this.startSchedule = false;
        this.bootingDateTime = SysUtils.getSysTimeStr();
        log.info("{}", this);
    }
}
