package com.sonic.lion.utils;

import com.sonic.lion.enums.PayGenrtatorCodeType;

import java.util.UUID;

public class KeyGenerator extends AbstractKeyGenerator {
    private static final KeyGenerator SINGLE = new KeyGenerator();

    private KeyGenerator() {
    }

    @Override
    public String customOrderKey() {
        return "";
    }

    public static KeyGenerator instance() {
        return SINGLE;
    }

    public static String UUID() {
        return UUID.randomUUID().toString();
    }

    @Override
    public String customKey() {
        return "";
    }

    /**
     * 编号生成规则 YYYYMMDD+2位业务代码+9位流水号
     * @param bizType 业务类型
     * @author Xi.He
     * @return 流水号
     */
    public String generatorUniqueKey(PayGenrtatorCodeType bizType) {
        return super.generatorUniqueKey(String.valueOf(bizType.getValue()));
    }
}
