Reorganize packages by domain
All checks were successful
build-and-deploy / build-deploy (push) Successful in 34s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 34s
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.android.trisolarisserver.repo.rate
|
||||
|
||||
import com.android.trisolarisserver.models.room.RateCalendar
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
import java.time.LocalDate
|
||||
import java.util.UUID
|
||||
|
||||
interface RateCalendarRepo : JpaRepository<RateCalendar, UUID> {
|
||||
fun findByRatePlanIdAndRateDateBetweenOrderByRateDateAsc(
|
||||
ratePlanId: UUID,
|
||||
from: LocalDate,
|
||||
to: LocalDate
|
||||
): List<RateCalendar>
|
||||
|
||||
fun findByRatePlanIdAndRateDate(ratePlanId: UUID, rateDate: LocalDate): RateCalendar?
|
||||
fun findByRatePlanIdAndRateDateIn(ratePlanId: UUID, dates: List<LocalDate>): List<RateCalendar>
|
||||
fun findByRatePlanId(ratePlanId: UUID): List<RateCalendar>
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.android.trisolarisserver.repo.rate
|
||||
|
||||
import com.android.trisolarisserver.models.room.RatePlan
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
import org.springframework.data.jpa.repository.EntityGraph
|
||||
import java.util.UUID
|
||||
|
||||
interface RatePlanRepo : JpaRepository<RatePlan, UUID> {
|
||||
@EntityGraph(attributePaths = ["roomType"])
|
||||
fun findByPropertyIdOrderByCode(propertyId: UUID): List<RatePlan>
|
||||
fun findByIdAndPropertyId(id: UUID, propertyId: UUID): RatePlan?
|
||||
fun existsByPropertyIdAndCode(propertyId: UUID, code: String): Boolean
|
||||
fun existsByPropertyIdAndRoomTypeIdAndCode(propertyId: UUID, roomTypeId: UUID, code: String): Boolean
|
||||
}
|
||||
Reference in New Issue
Block a user