package com.mzh.library.service;

import com.mzh.library.entity.AuthenticatedUser;
import com.mzh.library.entity.BorrowRecord;
import com.mzh.library.entity.BorrowRecordSearchCriteria;

import java.util.List;

public interface BorrowingService {
    ServiceResult<List<BorrowRecord>> searchRecords(AuthenticatedUser actor, BorrowRecordSearchCriteria criteria);

    ServiceResult<Long> borrowBook(AuthenticatedUser actor, String readerIdentifier, String bookIdentifier);

    ServiceResult<Void> returnBook(AuthenticatedUser actor, long recordId);

    ServiceResult<Void> renewLoan(AuthenticatedUser actor, long recordId);

    ServiceResult<List<BorrowRecord>> listCurrentReaderHistory(AuthenticatedUser actor);
}
