package org.octopus.internal.db

import org.octopus.internal.db.entities.ReportEntity
import org.springframework.data.jpa.repository.JpaRepository
import java.util.Date

interface ReportJpa : JpaRepository<ReportEntity, Long> {
    fun findFirstByStartIsTrue(): ReportEntity?
    fun findByStartIsFalse(): MutableList<ReportEntity>
    fun findByStartIsFalseAndReportMonthLessThanEqual(date: Date): MutableList<ReportEntity>
    fun deleteByReportMonthLessThanEqual(date: Date): Long
    fun deleteByReportMonthGreaterThan(date: Date): Long
    fun deleteByReportMonthGreaterThanEqual(date: Date): Long
}