Add rate plans, room stay rates, and payments ledger
All checks were successful
build-and-deploy / build-deploy (push) Successful in 34s

This commit is contained in:
androidlover5842
2026-01-29 04:56:37 +05:30
parent b6ac87d277
commit 71c70c8554
24 changed files with 902 additions and 4 deletions

View File

@@ -0,0 +1,20 @@
package com.android.trisolarisserver.repo
import com.android.trisolarisserver.models.booking.Payment
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.Query
import org.springframework.data.repository.query.Param
import java.util.UUID
interface PaymentRepo : JpaRepository<Payment, UUID> {
fun findByBookingIdOrderByReceivedAtDesc(bookingId: UUID): List<Payment>
@Query(
"""
select coalesce(sum(p.amount), 0)
from Payment p
where p.booking.id = :bookingId
"""
)
fun sumAmountByBookingId(@Param("bookingId") bookingId: UUID): Long
}