package com.yhy.module.core.service.resource;

import com.yhy.module.core.controller.admin.resource.vo.CatalogItemSaveReqVO;
import com.yhy.module.core.controller.admin.resource.vo.ResourceCategorySimpleRespVO;
import com.yhy.module.core.dal.dataobject.resource.ResourceCatalogItemDO;

import java.util.List;

public interface ResourceCatalogItemService {

    Long create(CatalogItemSaveReqVO reqVO);

    void update(CatalogItemSaveReqVO reqVO);

    void delete(Long id);

    List<ResourceCatalogItemDO> listByCatalog(Long catalogId);
    
    /**
     * 获取目录树节点允许的类别列表
     * 
     * @param catalogItemId 目录树节点ID
     * @return 允许的类别列表
     */
    List<ResourceCategorySimpleRespVO> getAllowedCategories(Long catalogItemId);
    
    /**
     * 交换两个节点的排序
     *
     * @param nodeId1 节点1的ID
     * @param nodeId2 节点2的ID
     */
    void swapSortOrder(Long nodeId1, Long nodeId2);
}
