package kr.co.uplus.ez.api.comm.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@SuppressWarnings("serial")
@Data
public class Menu implements Serializable{

	@ApiModelProperty(name = "메뉴 번호", example = "1001", dataType = "Integer")
	private Integer menuNo;
	@ApiModelProperty(name = "부모 메뉴 번호", example = "1001", dataType = "Integer")
	private Integer prntsMenuNo;
	@ApiModelProperty(name = "메뉴 명", example = "고객관리")
	private String menuNm;
	@ApiModelProperty(name = "메뉴 순서", example = "1", dataType = "Integer")
	private Integer menuOdrg;
	@ApiModelProperty(name = "사용 여부", example = "Y")
	private String useYn;
	@ApiModelProperty(name = "권한체크 그룹번호", example = "1001", dataType = "Integer")
	private Integer autchkGrpno;
	@ApiModelProperty(name = "메뉴 레벨", example = "1", dataType = "Integer")
	private Integer menuLvl;
	@ApiModelProperty(name = "메뉴 URL", example = "/login")
	private String menuUrl;
	@ApiModelProperty(name = "등록 ID", example = "test")
	private String regId;
	@ApiModelProperty(name = "등록 일시", example = "20110101")
	private String regDt;
	@ApiModelProperty(name = "변경 ID", example = "test")
	private String chgId;
	@ApiModelProperty(name = "변경 일시", example = "20110101")
	private String chgDt;
	@ApiModelProperty(name = "하위 메뉴 정보", dataType = "List<Menu>")
	private List<Menu> children = new ArrayList<>();

	public void addChild(Menu menu) {
		children.add(menu);
	}

}