package com.webchat.repository.dao;

import com.webchat.repository.entity.MomentTimeLineEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 程序员王七七 https://www.coderutil.com 网站作者
 * @Date: 2021-5-17 0017 23:51
 * @Description: 无描述信息
 */
@Repository
public interface IMomentTimeLineDAO extends JpaSpecificationExecutor<MomentTimeLineEntity>, JpaRepository<MomentTimeLineEntity, Long> {

    List<MomentTimeLineEntity> findAllByUserIdAndDeletedOrderByIdDesc(String userId, Boolean deleted);

    List<MomentTimeLineEntity> findAllByUserIdAndMomentUserIdAndDeletedOrderByIdDesc(String userId, String momentUserId, Boolean deleted);

    List<MomentTimeLineEntity> findAllByMomentIdAndDeletedOrderByIdDesc(Long momentId, Boolean deleted);
}
