package com.ruoyi.web.modules.trading;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import com.ruoyi.web.modules.trading.domain.BizGradeWeightConfig;

/**
 * 等级重量配置测试样本（与 sql/biz_grade_weight_config.sql 一致）。
 */
public final class GradeWeightConfigTestSamples
{
    private GradeWeightConfigTestSamples()
    {
    }

    public static List<BizGradeWeightConfig> standardList()
    {
        return Arrays.asList(
                config("A", "一级", "140", "999", 1),
                config("B", "二级", "120", "139.99", 2),
                config("C", "三级", "100", "119.99", 3),
                config("D", "等外品", "0", "99.99", 4));
    }

    private static BizGradeWeightConfig config(String code, String name, String min, String max, int sort)
    {
        BizGradeWeightConfig row = new BizGradeWeightConfig();
        row.setGradeCode(code);
        row.setGradeName(name);
        row.setMinWeight(new BigDecimal(min));
        row.setMaxWeight(new BigDecimal(max));
        row.setSortOrder(sort);
        return row;
    }
}
