package jnpf.enums.memberLog;

import lombok.Getter;

/**
 * 日志推送内容
 */
public enum MemberLogContentEnum {

    TITLE("TITLE", "%s的日志<br>"),
    CONTENT("CONTENT", "%s"),
    TODAY_WORK("TODAY_WORK", "今日完成工作:<br>%s"),
    INCOMPLETE_WORK("INCOMPLETE_WORK", "未完成工作:<br>%s"),
    COORDINATE_WORK("COORDINATE_WORK", "需协调工作:<br>%s");

    @Getter
    private String code;
    @Getter
    private String format;

    MemberLogContentEnum(String code, String format) {
        this.code = code;
        this.format = format;
    }

    public static String getContentFormat(String code) {
        for (MemberLogContentEnum value : values()) {
            if (value.getCode().equals(code)) {
                return value.getFormat();
            }
        }
        return null;
    }
}
