package cn.quant.baa.pay;

import java.time.Duration;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Date;

/**
 * Created by Administrator on 2021/8/23 0023.
 */
public class Constant {
    public final static String NAMESPACE_LOCAL_CACHE_TRANSACTION = "LOCAL_TRANSACTION";

    public static final LocalDate MAX_LOCAL_DATE = LocalDate.of(9999, 1, 1);

    /**
     * 默认初始日期
     */
    public static final LocalDate MINI_LOCAL_DATE = LocalDate.of(1970, 1, 1);
    public static final Date MINI_DATE = Date.from(MINI_LOCAL_DATE.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());

    public static final String REDIS_NAMESPACE_PAY = "BAAPAY:PAY:P";

    @Deprecated
    public static final Duration PAY_DUE_TIME = Duration.ofMinutes(30);

    public final static String DICT_TYPE_PAY= "PAY";
    public final static String DICT_CODE_WXP= "WXP";
    public final static String DICT_TYPE_APP_CONFIG= "APP_CONFIG";
    public final static String DICT_CODE_CALLBACK_URL= "CALLBACK_URL";
}
