package com.njcn.rdms.module.project.service.workreport.autogen;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
@ConfigurationProperties(prefix = "rdms.work-report.auto-gen")
@Data
public class WorkReportAutoGenProperties {

    private boolean enabled = false;

    private TriggerProperties weekly = new TriggerProperties();

    private TriggerProperties monthly = new TriggerProperties();

    private TriggerProperties project = new TriggerProperties();

    private ScopeProperties scope = new ScopeProperties();

    @Data
    public static class TriggerProperties {

        private boolean enabled = false;

        private String cron;
    }

    @Data
    public static class ScopeProperties {

        private List<Long> deptIds = new ArrayList<>();
    }
}
