package org.dromara.domain.asset.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.domain.asset.AssetType;

import java.util.ArrayList;
import java.util.List;

/**
 * 资产类型业务对象 asset_type
 *
 * @author boman
 * @date 2025-04-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = AssetType.class, reverseConvertGenerate = false)
public class AssetTypeBo extends BaseEntity {

    /**
     * 资产类型id
     */
    @NotNull(message = "资产类型id不能为空", groups = { EditGroup.class })
    private Long assetId;

    /**
     * 父资产类型id
     */
    private Long parentId;

    /**
     * 祖级列表
     */
    private String ancestors;

    /**
     * 资产类型名称
     */
    private String assetName;

    /**
     * 显示顺序
     */
    private Long orderNum;

    /**
     * 资产类型状态（1正常 2停用）
     */
    private String status;


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

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


}
