package com.erp.order.settlement.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.math.BigDecimal;
import java.util.List;

/**
 * 订单结算模块配置类
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "settlement")
public class SettlementConfig {

    /** 默认平台佣金率 */
    private BigDecimal defaultCommissionRate = new BigDecimal("0.006");

    /** 结算周期类型 */
    private List<String> periodTypes;

    /** 结算状态映射 */
    private StatusConfig status = new StatusConfig();

    @Data
    public static class StatusConfig {
        private String pending = "pending";
        private String calculating = "calculating";
        private String settled = "settled";
        private String frozen = "frozen";
    }
}
