package com.its.vms.domain;

import lombok.Data;

import java.io.Serializable;

/**
 *  다운로드 할 데이터의 정보를 저장할 객체
 */
@Data
public class VmsDownloadData implements Serializable {
    private static final long serialVersionUID = 1L;

    private boolean isDefault;
    private int maxSchedule;
    private int downloadCnt;
    private VmsDownloadDataInfo[] units;

    public VmsDownloadData() {
        this.units = new VmsDownloadDataInfo[VmsConstants.VMS_MAX_DOWNLOAD_FORMS];
        for (int ii = 0; ii <VmsConstants.VMS_MAX_DOWNLOAD_FORMS; ii++) {
            this.units[ii] = new VmsDownloadDataInfo();
        }
        init();
    }

    public void init() {
        this.isDefault = false;
        this.maxSchedule = 0;
        this.downloadCnt = 0;
        for (int ii = 0; ii < VmsConstants.VMS_MAX_DOWNLOAD_FORMS; ii++) {
            this.units[ii].init();
        }
    }

    @Data
    public static class VmsDownloadDataInfo implements Serializable {
        private static final long serialVersionUID = 1L;

        private Integer vmsFormId;
        private boolean isDownload;
        private int formIdx;
        private int bitmapId;
        private int formNo;
        private int displaySec;
        private int displayType;
        private int bkClr;

        public void init() {
            this.vmsFormId = 0;
            this.isDownload = false;
            this.formIdx = 0;
            this.bitmapId = 0;
            this.formNo = 0;
            this.displaySec = 0;
            this.displayType = 0;
            this.bkClr = 0;
        }
    }
}
