package com.softwarebr.nunu.dao.go;

import com.softwarebr.nunu.entity.go.Label;
import com.brframework.commondb.core.CommonRepository;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @date 2020-02-19 14:03:47
 * @author lilin
 */

@Repository
public interface LabelDao extends CommonRepository<Long, Label> {

    /**
     * 根据父级查找标签
     * @param parentId
     * @param status 状态{@link Label}
     * @return
     */
    List<Label> findByParentIdAndStatusOrderBySortAsc(Long parentId, Integer status);

    /**
     * 查询所有未删除的标签
     * @param status
     * @return
     */
    List<Label> findByStatusOrderBySortAsc(Integer status);
}