package com.bizzan.bitrade.entity;

/**
 * K线周期枚举，值与数据库 period 字段保持一致。
 */
public enum KLinePeriod {

    M1("1m"),
    M5("5m"),
    M15("15m"),
    M30("30m"),
    H1("1h"),
    H4("4h"),
    D1("1d"),
    W1("1w"),
    MON1("1mon");

    private final String code;

    KLinePeriod(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    @Override
    public String toString() {
        return code;
    }
}
