package com.qmth.teachcloud.common.config;

import com.qmth.teachcloud.common.domain.*;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: 数据字典
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/4/10
 */
@Configuration
public class DictionaryConfig {

    /**
     * 模块前缀
     *
     * @return
     */
    @Bean
    @ConfigurationProperties(prefix = "prefix.url")
    public PrefixUrlDomain prefixUrlDomain() {
        return new PrefixUrlDomain();
    }

    /**
     * 系统配置
     *
     * @return
     */
    @Bean
    @ConfigurationProperties(prefix = "sys.config")
    public SysDomain sysDomain() {
        return new SysDomain();
    }

    /**
     * 短信配置
     *
     * @return
     */
    @Bean
    @ConfigurationProperties(prefix = "sms.config")
    public SmsDomain smsDomain() {
        return new SmsDomain();
    }

    /**
     * 阿里云oss配置
     *
     * @return
     */
    @Bean
    @ConfigurationProperties(prefix = "aliyun.oss")
    public AliYunOssDomain aliYunOssDomain() {
        return new AliYunOssDomain();
    }

    /**
     * 机构用户中心配置
     *
     * @return
     */
    @Bean
    @ConfigurationProperties(prefix = "org.center", ignoreUnknownFields = false)
    public OrgCenterDomain orgCenterDomain() {
        return new OrgCenterDomain();
    }


    /**
     * 云阅卷同步推送
     *
     * @return
     */
    @Bean
    @ConfigurationProperties(prefix = "sync.config", ignoreUnknownFields = false)
    public SyncDataDomain syncDataDomain() {
        return new SyncDataDomain();
    }

    /**
     * 云阅卷配置
     *
     * @return
     */
    @Bean
    @ConfigurationProperties(prefix = "yun.mark", ignoreUnknownFields = false)
    public YunMarkDomain yunMarkDomain() {
        return new YunMarkDomain();
    }

    @Bean
    @ConfigurationProperties(prefix = "com.qmth.fss.public", ignoreUnknownFields = false)
    public FssPublicDomain fssPublicDomain() {
        return new FssPublicDomain();
    }

    @Bean
    @ConfigurationProperties(prefix = "com.qmth.fss.private", ignoreUnknownFields = false)
    public FssPrivateDomain fssPrivateDomain() {
        return new FssPrivateDomain();
    }

    /**
     * 分布式印刷开放接口
     *
     * @return
     */
    @Bean
    @ConfigurationProperties(prefix = "print.open", ignoreUnknownFields = false)
    public PrintOpenDomain printOpenDomain() {
        return new PrintOpenDomain();
    }

    /**
     * 教研分析开放接口
     *
     * @return
     */
    @Bean
    @ConfigurationProperties(prefix = "report.open", ignoreUnknownFields = false)
    public ReportOpenDomain reportOpenDomain() {
        return new ReportOpenDomain();
    }
}
