package cn.iocoder.yudao.module.system.enums.notice;

import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 *
 * 消息业务类型枚举
 * @author jinyd
 */
@AllArgsConstructor
@Getter
public enum NotieBusinessNameEnum implements ArrayValuable<Integer> {

    CHECK_IN_NAME(0, "入住办理"),
    SYNTHETIC_ABILITY_NAME(1, "能力评估"),
    EXPENSE_ORDER_NAME(2, "账单缴费"),
    EREFUND_SETTLEMENT_NAME(3, "退住结算"),
    SELF_MEDICATION_WARNING_NAME(4, "自带药用完预警"),
    SELF_MEDICATION_EXPIRE_NAME(5, "自带药过期预警"),
    ELDERLY_CONTRACT_EXPIRE_NAME(6, "合同过期预警"),
    ELDER_BIRTHDAY_NAME(7, "生日关怀");

    public static final Integer[] ARRAYS = Arrays.stream(values()).map(NotieBusinessNameEnum::getValue).toArray(Integer[]::new);

    /**
     * 类型
     */
    private final Integer value;
    /**
     * 转改名
     */
    private final String name;

    public static NotieBusinessNameEnum valueOf(Integer value) {
        return ArrayUtil.firstMatch(businessType -> businessType.getValue().equals(value), NotieBusinessNameEnum.values());
    }

    @Override
    public Integer[] array() {
        return ARRAYS;
    }

}
