44 lines
923 B
Java
44 lines
923 B
Java
package com.zeodao.reminder.model;
|
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Data;
|
|
import lombok.NoArgsConstructor;
|
|
|
|
/**
|
|
* 项目信息实体类
|
|
*
|
|
* @author Zeodao
|
|
* @version 2.0.0
|
|
*/
|
|
@Data
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
public class ProjectInfo {
|
|
|
|
private Integer id;
|
|
private String name;
|
|
private String status;
|
|
private boolean exists;
|
|
|
|
/**
|
|
* 检查项目是否处于活跃状态
|
|
*/
|
|
public boolean isActive() {
|
|
return exists && !"closed".equals(status) && !"suspended".equals(status);
|
|
}
|
|
|
|
/**
|
|
* 获取项目状态描述
|
|
*/
|
|
public String getStatusDescription() {
|
|
switch (status) {
|
|
case "wait": return "未开始";
|
|
case "doing": return "进行中";
|
|
case "suspended": return "已挂起";
|
|
case "closed": return "已关闭";
|
|
default: return "未知状态";
|
|
}
|
|
}
|
|
|
|
}
|