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

import com.github.microservice.components.data.mongo.mongo.dao.MongoDao;
import com.zhongshu.card.server.core.domain.scene.RoleSceneInfo;
import com.zhongshu.card.server.core.domain.scene.SceneInfo;

import java.util.List;

public interface RoleSceneInfoDao extends MongoDao<RoleSceneInfo> {

    RoleSceneInfo findTopById(String id);

    RoleSceneInfo findTopByProjectSceneInfoIdAndRoleId(String projectSceneInfoId, String roleId);

    long countByRoleId(String roleId);

    List<RoleSceneInfo> findByRoleIdOrderBySortAsc(String roleId);

    List<RoleSceneInfo> findByRoleIdInOrderBySortAsc(List<String> roleIds);

    long deleteByProjectSceneInfoId(String projectSceneInfoId);

    long deleteBySceneInfoId(String sceneInfoId);

    long deleteByRoleId(String roleId);

}
