package com.apobates.forum.letterbox.service;

import com.apobates.forum.letterbox.entity.ForumLetterTypeEnum;
import com.apobates.forum.letterbox.entity.proxy.ForumLetterReplica;
import com.apobates.forum.utils.persistence.Page;
import com.apobates.forum.utils.persistence.Pageable;

/**
 *
 * @author xiaofanku
 * @since 20200510
 */
public interface OutboxService {
    /**
     * 查看指定会员的发件箱,级联加载信件的收件人
     *
     * @param memberId 会员ID/信件的发件人
     * @param pageable 分页请求参数
     * @return
     */
    Page<ForumLetterReplica> getSent(long memberId, Pageable pageable);
    /**
     * 
     * @param memberId
     * @return 
     */
    long countSentByMember(long memberId);
    
    /**
     * 查看指定会员的发件箱,级联加载信件的收件人
     *
     * @param memberId 会员ID/信件的发件人
     * @param label 信件类型
     * @param pageable 分页请求参数
     * @return
     */
    Page<ForumLetterReplica> getSent(long memberId, ForumLetterTypeEnum label, Pageable pageable);
    /**
     * 
     * @param memberId
     * @param label
     * @return 
     */
    long countSentByMember(long memberId, ForumLetterTypeEnum label);
}