메뉴 목록 가져오는 로직 추가, demo api url 삭제
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.kamco.cd.kamcoback.postgres.entity;
|
||||
|
||||
import com.kamco.cd.kamcoback.menu.dto.MenuDto;
|
||||
import com.kamco.cd.kamcoback.postgres.CommonDateEntity;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
@@ -47,4 +48,25 @@ public class MenuEntity extends CommonDateEntity {
|
||||
|
||||
@OneToMany(mappedBy = "parent", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
|
||||
private List<MenuEntity> children = new ArrayList<>();
|
||||
|
||||
@Column(name = "menu_api_uri")
|
||||
private String menuApiUri;
|
||||
|
||||
public MenuDto.Basic toDto(){
|
||||
return new MenuDto.Basic(
|
||||
this.menuUid,
|
||||
this.menuNm,
|
||||
this.menuUrl,
|
||||
this.description,
|
||||
this.menuOrder,
|
||||
this.isUse,
|
||||
this.deleted,
|
||||
this.createdUid,
|
||||
this.updatedUid,
|
||||
this.children.stream().map(MenuEntity::toDto).toList(),
|
||||
this.getCreatedDate(),
|
||||
this.getModifiedDate(),
|
||||
this.menuApiUri
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user