package com.sunxung.factoring.service.sys;

import com.sunxung.factoring.entity.sys.Dictionary;

import java.util.List;

/**
 * 字典service
 */
public interface DictionaryService {

    Dictionary add(Dictionary dictionary);

    Dictionary update(Dictionary dictionary);

    boolean delete(Long id);

    Dictionary get(Long id);

    Dictionary getByCode(String code);

    Dictionary getByNameAndParentCode(String name, String parentCode);

    List<Dictionary> findByParentId(Long parentId);

    List<Dictionary> findByParentIdIsNull();

    List<Dictionary> findByParentCode(String parentCode);

    List<Dictionary> findByParentCodeAndCode(String parentCode, String code);
}
