package com.ruoyi.system.domain.enums;
|
|
/**
|
* 任务车辆关联状态枚举
|
*
|
* @author ruoyi
|
*/
|
public enum TaskVehicleStatus {
|
|
/** 已分配 */
|
ASSIGNED("ASSIGNED", "已分配"),
|
|
/** 执行中 */
|
ACTIVE("ACTIVE", "执行中"),
|
|
/** 已完成 */
|
COMPLETED("COMPLETED", "已完成"),
|
|
/** 已取消 */
|
CANCELLED("CANCELLED", "已取消");
|
|
private final String code;
|
private final String info;
|
|
TaskVehicleStatus(String code, String info) {
|
this.code = code;
|
this.info = info;
|
}
|
|
public String getCode() {
|
return code;
|
}
|
|
public String getInfo() {
|
return info;
|
}
|
|
public static TaskVehicleStatus getByCode(String code) {
|
for (TaskVehicleStatus status : values()) {
|
if (status.getCode().equals(code)) {
|
return status;
|
}
|
}
|
return null;
|
}
|
}
|