package com.zhongshu.card.server.core.dao.org;

import com.github.microservice.components.data.mongo.mongo.dao.MongoDao;
import com.zhongshu.card.server.core.dao.org.extend.OrganizationDaoExtend;
import com.zhongshu.card.server.core.domain.org.Department;
import com.zhongshu.card.server.core.domain.org.Organization;

import java.util.List;

/**
 * @author TRX
 * @date 2024/3/21
 */
public interface DepartmentDao extends MongoDao<Department> {

    Department findTopById(String id);

    List<Department> findByOidOrderBySortAsc(String oid);

    Department findByNameAndOid(String name, String oid);

    Department findTopByProjectOidAndName(String projectOid, String name);

    Department findTopByCodeAndOid(String code, String oid);

    List<Department> findByParentIdAndOid(String parentId, String oid);

    List<Department> findByOidAndIdIn(String oid, List<String> ids);

    List<Department> findByIdIn(List<String> ids);
}
