package com.cpop.oam.framework.enums;

import com.cpop.core.utils.SpringUtils;
import com.cpop.oam.framework.strategy.cloud.CloudCallbackStrategy;
import com.cpop.oam.framework.strategy.cloud.CloudDataImportCallbackStrategy;
import com.cpop.oam.framework.strategy.cloud.CloudSyncBrandOrStoreCallbackStrategy;
import lombok.Getter;

/**
 * @author DB
 * @version 1.0.0
 * @since 2024-01-16 11:38
 */
@Getter
public enum CloudCallbackEnums {

    /**
     * 数据导入回调
     */
    DATA_IMPORT_CALLBACK(0, "dataImportCallback", SpringUtils.getBean(CloudDataImportCallbackStrategy.class)),
    /**
     * 同步品牌与校区回调
     */
    SYNC_BRAND_AND_STORE_CALLBACK(1, "syncBrandAndStoreCallback", SpringUtils.getBean(CloudSyncBrandOrStoreCallbackStrategy.class))
    ;

    CloudCallbackEnums(Integer code, String name, CloudCallbackStrategy cloudCallbackStrategy) {
        this.code = code;
        this.name = name;
        this.cloudCallbackStrategy = cloudCallbackStrategy;
    }

    private Integer code;

    private String name;

    private CloudCallbackStrategy cloudCallbackStrategy;

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setCloudCallbackStrategy(CloudCallbackStrategy cloudCallbackStrategy) {
        this.cloudCallbackStrategy = cloudCallbackStrategy;
    }
}
