package cn.iocoder.yudao.module.order.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum OrderTempLateEnum {
    SEA_BILL_LADING_TEMPLATE(1, "billLading", "billLading","提单模板"),
    SEA_AIR_BILL_LADING_TEMPLATE(2, "billLading", "billLading","提单模板"),
    AIR_BILL_LADING_TEMPLATE(3, "billLading", "billLading","提单模板"),
    ;

    private Integer code;

    private String nameZh;
    private String nameEn;

    private String description;

    OrderTempLateEnum(Integer code, String nameZh, String nameEn, String description) {
        this.code = code;
        this.nameZh = nameZh;
        this.nameEn = nameEn;
        this.description = description;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getNameZh() {
        return nameZh;
    }

    public void setNameZh(String nameZh) {
        this.nameZh = nameZh;
    }

    public String getNameEn() {
        return nameEn;
    }

    public void setNameEn(String nameEn) {
        this.nameEn = nameEn;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }


    public static OrderTempLateEnum getEnumByCode(Integer code){
        for(OrderTempLateEnum orderTempLateEnum : OrderTempLateEnum.values()){
            if(Objects.equals(code, orderTempLateEnum.getCode())){
                return orderTempLateEnum;
            }
        }
        return null;
    }

}
