模型库
This commit is contained in:
40
src/main/java/com/yj/earth/vo/ModelTypeVo.java
Normal file
40
src/main/java/com/yj/earth/vo/ModelTypeVo.java
Normal file
@ -0,0 +1,40 @@
|
||||
package com.yj.earth.vo;
|
||||
|
||||
import com.yj.earth.business.domain.ModelType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ModelTypeVo {
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "模型类型名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "父级节点ID")
|
||||
private String parentId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updatedAt;
|
||||
@Schema(description = "子节点列表")
|
||||
private List<ModelTypeVo> children = new ArrayList<>();
|
||||
|
||||
public ModelTypeVo(ModelType modelType) {
|
||||
this.id = modelType.getId();
|
||||
this.name = modelType.getName();
|
||||
this.parentId = modelType.getParentId();
|
||||
this.createdAt = modelType.getCreatedAt();
|
||||
this.updatedAt = modelType.getUpdatedAt();
|
||||
}
|
||||
}
|
||||
9
src/main/java/com/yj/earth/vo/ModelVo.java
Normal file
9
src/main/java/com/yj/earth/vo/ModelVo.java
Normal file
@ -0,0 +1,9 @@
|
||||
package com.yj.earth.vo;
|
||||
|
||||
import com.yj.earth.business.domain.Model;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ModelVo extends Model {
|
||||
private String modelTypeName;
|
||||
}
|
||||
Reference in New Issue
Block a user