package cn.axzo.workflow.core.service;


import cn.axzo.workflow.common.model.request.category.CategoryCreateDTO;
import cn.axzo.workflow.common.model.request.category.CategorySearchDTO;
import cn.axzo.workflow.common.model.request.category.CategoryUpdateDTO;
import cn.axzo.workflow.common.model.response.category.CategoryItemVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * Category的增删改查
 */
@Deprecated
public interface CategoryService {

    /**
     * 创建
     *
     * @param createDTO {@link #createCategory(CategoryCreateDTO)}
     * @return insert record count
     */
    int createCategory(CategoryCreateDTO createDTO);

    /**
     * 修改
     *
     * @param updateDTO {@link #updateCategory(CategoryUpdateDTO)}
     * @return update record count
     */
    int updateCategory(CategoryUpdateDTO updateDTO);

    /**
     * 删除
     *
     * @param id {@link #deleteCategory(Long)}
     * @return this row primary key
     */
    int deleteCategory(Long id);

    /**
     * 查询
     *
     * @param findDTO {@link #findCategory(CategorySearchDTO)}
     * @return {@link CategoryItemVO}
     */
    Page<CategoryItemVO> findCategory(CategorySearchDTO findDTO);

    /**
     * 更新字典状态
     *
     * @param id    字典 ID
     * @param state
     * @return
     */
    Boolean updateState(Long id, Boolean state);
}
