package com.ningdatech.carapi.sys.entity.dto;

import io.swagger.annotations.ApiModel;
import lombok.*;
import lombok.experimental.Accessors;

import java.util.Collections;
import java.util.List;

/**
 * @Classname CascadeDTO
 * @Description
 * @Date 2022/11/2 13:50
 * @Created by PoffyZhang
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "CascadeDTO", description = "用于级联返回")
public class CascadeDTO {

    public static CascadeDTO of(Long id,String name,List<CascadeDTO> list){
        return new CascadeDTO(id,name,list);
    }

    private Long id;

    private String name;

    private List<CascadeDTO> children;

}
