package com.sonic.lion.service;

import com.sonic.lion.domain.entity.GoogleUploadReceipt;
import org.springframework.lang.NonNull;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author: code
 * @date: 2025/07/15
 * @Description:
 * @version: 1.0.0
 */
public interface GoogleUploadReceiptService {

    /**
     * 保存收据
     *
     * @param googleUploadReceipt
     */
    Long save(@NonNull GoogleUploadReceipt googleUploadReceipt);


    GoogleUploadReceipt getById(Long id);

    /**
     * 查询是否存在了这个凭据
     *
     * @param receipt
     * @return
     */
    boolean countRecepit(String receipt);

    /**
     * 更新是否处理
     *
     * @param id
     * @param processed
     * @return
     */
    int updateProcessed(@NonNull Long id, @NonNull Boolean processed);

    /**
     * 查询未处理的收据
     *
     * @param processed
     * @param startCreateTime
     * @return
     */
    List<GoogleUploadReceipt> list(Boolean processed, LocalDateTime startCreateTime, Integer num);
}
