package org.dromara.domain.asset.vo;


import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.domain.asset.AssetType;

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


/**
 * 资产类型视图对象 asset_type
 *
 * @author boman
 * @date 2025-04-11
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = AssetType.class)
public class AssetTypeVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 资产类型id
     */
    @ExcelProperty(value = "资产类型id")
    private Long assetId;

    /**
     * 父资产类型id
     */
    @ExcelProperty(value = "父资产类型id")
    private Long parentId;

    /**
     * 祖级列表
     */
    @ExcelProperty(value = "祖级列表")
    private String ancestors;

    /**
     * 资产类型名称
     */
    @ExcelProperty(value = "资产类型名称")
    private String assetName;

    /**
     * 显示顺序
     */
    @ExcelProperty(value = "显示顺序")
    private Long orderNum;

    /**
     * 资产类型状态（1正常 2停用）
     */
    @ExcelProperty(value = "资产类型状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "1=正常,2=停用")
    private String status;


    /** 删除标志（N代表存在 Y代表删除） */
    private String delFlag;

    /** 父资产名称 */
    private String parentName;
    /** 子资产 */
    private List<AssetType> children = new ArrayList<AssetType>();


}
