package cn.novalon.manage.notify.core.repository;

import cn.novalon.manage.notify.core.domain.SysUserMessage;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public interface ISysUserMessageRepository {

    Flux<SysUserMessage> findByUserIdOrderByCreateTimeDesc(Long userId);

    Flux<SysUserMessage> findByUserIdAndIsReadOrderByCreateTimeDesc(Long userId, String isRead);

    Mono<Long> countByUserIdAndIsRead(Long userId, String isRead);

    Mono<SysUserMessage> save(SysUserMessage message);

    Mono<SysUserMessage> findById(Long id);

    Mono<Void> deleteById(Long id);
}
