refund roadmap pr-1 and pr-2

This commit is contained in:
2026-05-11 13:04:20 +07:00
parent d2b0a780d5
commit 54f4569107
36 changed files with 5750 additions and 19 deletions
+142
View File
@@ -257,6 +257,7 @@ export type BookingWhereInput = {
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
participant?: Prisma.XOR<Prisma.TripParticipantScalarRelationFilter, Prisma.TripParticipantWhereInput>
payments?: Prisma.PaymentListRelationFilter
refunds?: Prisma.RefundListRelationFilter
}
export type BookingOrderByWithRelationInput = {
@@ -273,6 +274,7 @@ export type BookingOrderByWithRelationInput = {
user?: Prisma.UserOrderByWithRelationInput
participant?: Prisma.TripParticipantOrderByWithRelationInput
payments?: Prisma.PaymentOrderByRelationAggregateInput
refunds?: Prisma.RefundOrderByRelationAggregateInput
}
export type BookingWhereUniqueInput = Prisma.AtLeast<{
@@ -293,6 +295,7 @@ export type BookingWhereUniqueInput = Prisma.AtLeast<{
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
participant?: Prisma.XOR<Prisma.TripParticipantScalarRelationFilter, Prisma.TripParticipantWhereInput>
payments?: Prisma.PaymentListRelationFilter
refunds?: Prisma.RefundListRelationFilter
}, "id" | "participantId" | "tripId_userId">
export type BookingOrderByWithAggregationInput = {
@@ -338,6 +341,7 @@ export type BookingCreateInput = {
user: Prisma.UserCreateNestedOneWithoutBookingsInput
participant: Prisma.TripParticipantCreateNestedOneWithoutBookingInput
payments?: Prisma.PaymentCreateNestedManyWithoutBookingInput
refunds?: Prisma.RefundCreateNestedManyWithoutBookingInput
}
export type BookingUncheckedCreateInput = {
@@ -351,6 +355,7 @@ export type BookingUncheckedCreateInput = {
createdAt?: Date | string
updatedAt?: Date | string
payments?: Prisma.PaymentUncheckedCreateNestedManyWithoutBookingInput
refunds?: Prisma.RefundUncheckedCreateNestedManyWithoutBookingInput
}
export type BookingUpdateInput = {
@@ -364,6 +369,7 @@ export type BookingUpdateInput = {
user?: Prisma.UserUpdateOneRequiredWithoutBookingsNestedInput
participant?: Prisma.TripParticipantUpdateOneRequiredWithoutBookingNestedInput
payments?: Prisma.PaymentUpdateManyWithoutBookingNestedInput
refunds?: Prisma.RefundUpdateManyWithoutBookingNestedInput
}
export type BookingUncheckedUpdateInput = {
@@ -377,6 +383,7 @@ export type BookingUncheckedUpdateInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
payments?: Prisma.PaymentUncheckedUpdateManyWithoutBookingNestedInput
refunds?: Prisma.RefundUncheckedUpdateManyWithoutBookingNestedInput
}
export type BookingCreateManyInput = {
@@ -615,6 +622,20 @@ export type BookingUpdateOneRequiredWithoutPaymentsNestedInput = {
update?: Prisma.XOR<Prisma.XOR<Prisma.BookingUpdateToOneWithWhereWithoutPaymentsInput, Prisma.BookingUpdateWithoutPaymentsInput>, Prisma.BookingUncheckedUpdateWithoutPaymentsInput>
}
export type BookingCreateNestedOneWithoutRefundsInput = {
create?: Prisma.XOR<Prisma.BookingCreateWithoutRefundsInput, Prisma.BookingUncheckedCreateWithoutRefundsInput>
connectOrCreate?: Prisma.BookingCreateOrConnectWithoutRefundsInput
connect?: Prisma.BookingWhereUniqueInput
}
export type BookingUpdateOneRequiredWithoutRefundsNestedInput = {
create?: Prisma.XOR<Prisma.BookingCreateWithoutRefundsInput, Prisma.BookingUncheckedCreateWithoutRefundsInput>
connectOrCreate?: Prisma.BookingCreateOrConnectWithoutRefundsInput
upsert?: Prisma.BookingUpsertWithoutRefundsInput
connect?: Prisma.BookingWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.BookingUpdateToOneWithWhereWithoutRefundsInput, Prisma.BookingUpdateWithoutRefundsInput>, Prisma.BookingUncheckedUpdateWithoutRefundsInput>
}
export type BookingCreateWithoutUserInput = {
id?: string
amount: number
@@ -625,6 +646,7 @@ export type BookingCreateWithoutUserInput = {
trip: Prisma.TripCreateNestedOneWithoutBookingsInput
participant: Prisma.TripParticipantCreateNestedOneWithoutBookingInput
payments?: Prisma.PaymentCreateNestedManyWithoutBookingInput
refunds?: Prisma.RefundCreateNestedManyWithoutBookingInput
}
export type BookingUncheckedCreateWithoutUserInput = {
@@ -637,6 +659,7 @@ export type BookingUncheckedCreateWithoutUserInput = {
createdAt?: Date | string
updatedAt?: Date | string
payments?: Prisma.PaymentUncheckedCreateNestedManyWithoutBookingInput
refunds?: Prisma.RefundUncheckedCreateNestedManyWithoutBookingInput
}
export type BookingCreateOrConnectWithoutUserInput = {
@@ -690,6 +713,7 @@ export type BookingCreateWithoutTripInput = {
user: Prisma.UserCreateNestedOneWithoutBookingsInput
participant: Prisma.TripParticipantCreateNestedOneWithoutBookingInput
payments?: Prisma.PaymentCreateNestedManyWithoutBookingInput
refunds?: Prisma.RefundCreateNestedManyWithoutBookingInput
}
export type BookingUncheckedCreateWithoutTripInput = {
@@ -702,6 +726,7 @@ export type BookingUncheckedCreateWithoutTripInput = {
createdAt?: Date | string
updatedAt?: Date | string
payments?: Prisma.PaymentUncheckedCreateNestedManyWithoutBookingInput
refunds?: Prisma.RefundUncheckedCreateNestedManyWithoutBookingInput
}
export type BookingCreateOrConnectWithoutTripInput = {
@@ -740,6 +765,7 @@ export type BookingCreateWithoutParticipantInput = {
trip: Prisma.TripCreateNestedOneWithoutBookingsInput
user: Prisma.UserCreateNestedOneWithoutBookingsInput
payments?: Prisma.PaymentCreateNestedManyWithoutBookingInput
refunds?: Prisma.RefundCreateNestedManyWithoutBookingInput
}
export type BookingUncheckedCreateWithoutParticipantInput = {
@@ -752,6 +778,7 @@ export type BookingUncheckedCreateWithoutParticipantInput = {
createdAt?: Date | string
updatedAt?: Date | string
payments?: Prisma.PaymentUncheckedCreateNestedManyWithoutBookingInput
refunds?: Prisma.RefundUncheckedCreateNestedManyWithoutBookingInput
}
export type BookingCreateOrConnectWithoutParticipantInput = {
@@ -780,6 +807,7 @@ export type BookingUpdateWithoutParticipantInput = {
trip?: Prisma.TripUpdateOneRequiredWithoutBookingsNestedInput
user?: Prisma.UserUpdateOneRequiredWithoutBookingsNestedInput
payments?: Prisma.PaymentUpdateManyWithoutBookingNestedInput
refunds?: Prisma.RefundUpdateManyWithoutBookingNestedInput
}
export type BookingUncheckedUpdateWithoutParticipantInput = {
@@ -792,6 +820,7 @@ export type BookingUncheckedUpdateWithoutParticipantInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
payments?: Prisma.PaymentUncheckedUpdateManyWithoutBookingNestedInput
refunds?: Prisma.RefundUncheckedUpdateManyWithoutBookingNestedInput
}
export type BookingCreateWithoutPaymentsInput = {
@@ -804,6 +833,7 @@ export type BookingCreateWithoutPaymentsInput = {
trip: Prisma.TripCreateNestedOneWithoutBookingsInput
user: Prisma.UserCreateNestedOneWithoutBookingsInput
participant: Prisma.TripParticipantCreateNestedOneWithoutBookingInput
refunds?: Prisma.RefundCreateNestedManyWithoutBookingInput
}
export type BookingUncheckedCreateWithoutPaymentsInput = {
@@ -816,6 +846,7 @@ export type BookingUncheckedCreateWithoutPaymentsInput = {
status?: $Enums.BookingStatus
createdAt?: Date | string
updatedAt?: Date | string
refunds?: Prisma.RefundUncheckedCreateNestedManyWithoutBookingInput
}
export type BookingCreateOrConnectWithoutPaymentsInput = {
@@ -844,6 +875,7 @@ export type BookingUpdateWithoutPaymentsInput = {
trip?: Prisma.TripUpdateOneRequiredWithoutBookingsNestedInput
user?: Prisma.UserUpdateOneRequiredWithoutBookingsNestedInput
participant?: Prisma.TripParticipantUpdateOneRequiredWithoutBookingNestedInput
refunds?: Prisma.RefundUpdateManyWithoutBookingNestedInput
}
export type BookingUncheckedUpdateWithoutPaymentsInput = {
@@ -856,6 +888,75 @@ export type BookingUncheckedUpdateWithoutPaymentsInput = {
status?: Prisma.EnumBookingStatusFieldUpdateOperationsInput | $Enums.BookingStatus
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
refunds?: Prisma.RefundUncheckedUpdateManyWithoutBookingNestedInput
}
export type BookingCreateWithoutRefundsInput = {
id?: string
amount: number
currency?: string
status?: $Enums.BookingStatus
createdAt?: Date | string
updatedAt?: Date | string
trip: Prisma.TripCreateNestedOneWithoutBookingsInput
user: Prisma.UserCreateNestedOneWithoutBookingsInput
participant: Prisma.TripParticipantCreateNestedOneWithoutBookingInput
payments?: Prisma.PaymentCreateNestedManyWithoutBookingInput
}
export type BookingUncheckedCreateWithoutRefundsInput = {
id?: string
tripId: string
userId: string
participantId: string
amount: number
currency?: string
status?: $Enums.BookingStatus
createdAt?: Date | string
updatedAt?: Date | string
payments?: Prisma.PaymentUncheckedCreateNestedManyWithoutBookingInput
}
export type BookingCreateOrConnectWithoutRefundsInput = {
where: Prisma.BookingWhereUniqueInput
create: Prisma.XOR<Prisma.BookingCreateWithoutRefundsInput, Prisma.BookingUncheckedCreateWithoutRefundsInput>
}
export type BookingUpsertWithoutRefundsInput = {
update: Prisma.XOR<Prisma.BookingUpdateWithoutRefundsInput, Prisma.BookingUncheckedUpdateWithoutRefundsInput>
create: Prisma.XOR<Prisma.BookingCreateWithoutRefundsInput, Prisma.BookingUncheckedCreateWithoutRefundsInput>
where?: Prisma.BookingWhereInput
}
export type BookingUpdateToOneWithWhereWithoutRefundsInput = {
where?: Prisma.BookingWhereInput
data: Prisma.XOR<Prisma.BookingUpdateWithoutRefundsInput, Prisma.BookingUncheckedUpdateWithoutRefundsInput>
}
export type BookingUpdateWithoutRefundsInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
amount?: Prisma.IntFieldUpdateOperationsInput | number
currency?: Prisma.StringFieldUpdateOperationsInput | string
status?: Prisma.EnumBookingStatusFieldUpdateOperationsInput | $Enums.BookingStatus
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
trip?: Prisma.TripUpdateOneRequiredWithoutBookingsNestedInput
user?: Prisma.UserUpdateOneRequiredWithoutBookingsNestedInput
participant?: Prisma.TripParticipantUpdateOneRequiredWithoutBookingNestedInput
payments?: Prisma.PaymentUpdateManyWithoutBookingNestedInput
}
export type BookingUncheckedUpdateWithoutRefundsInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
tripId?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.StringFieldUpdateOperationsInput | string
participantId?: Prisma.StringFieldUpdateOperationsInput | string
amount?: Prisma.IntFieldUpdateOperationsInput | number
currency?: Prisma.StringFieldUpdateOperationsInput | string
status?: Prisma.EnumBookingStatusFieldUpdateOperationsInput | $Enums.BookingStatus
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
payments?: Prisma.PaymentUncheckedUpdateManyWithoutBookingNestedInput
}
export type BookingCreateManyUserInput = {
@@ -879,6 +980,7 @@ export type BookingUpdateWithoutUserInput = {
trip?: Prisma.TripUpdateOneRequiredWithoutBookingsNestedInput
participant?: Prisma.TripParticipantUpdateOneRequiredWithoutBookingNestedInput
payments?: Prisma.PaymentUpdateManyWithoutBookingNestedInput
refunds?: Prisma.RefundUpdateManyWithoutBookingNestedInput
}
export type BookingUncheckedUpdateWithoutUserInput = {
@@ -891,6 +993,7 @@ export type BookingUncheckedUpdateWithoutUserInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
payments?: Prisma.PaymentUncheckedUpdateManyWithoutBookingNestedInput
refunds?: Prisma.RefundUncheckedUpdateManyWithoutBookingNestedInput
}
export type BookingUncheckedUpdateManyWithoutUserInput = {
@@ -925,6 +1028,7 @@ export type BookingUpdateWithoutTripInput = {
user?: Prisma.UserUpdateOneRequiredWithoutBookingsNestedInput
participant?: Prisma.TripParticipantUpdateOneRequiredWithoutBookingNestedInput
payments?: Prisma.PaymentUpdateManyWithoutBookingNestedInput
refunds?: Prisma.RefundUpdateManyWithoutBookingNestedInput
}
export type BookingUncheckedUpdateWithoutTripInput = {
@@ -937,6 +1041,7 @@ export type BookingUncheckedUpdateWithoutTripInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
payments?: Prisma.PaymentUncheckedUpdateManyWithoutBookingNestedInput
refunds?: Prisma.RefundUncheckedUpdateManyWithoutBookingNestedInput
}
export type BookingUncheckedUpdateManyWithoutTripInput = {
@@ -957,10 +1062,12 @@ export type BookingUncheckedUpdateManyWithoutTripInput = {
export type BookingCountOutputType = {
payments: number
refunds: number
}
export type BookingCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
payments?: boolean | BookingCountOutputTypeCountPaymentsArgs
refunds?: boolean | BookingCountOutputTypeCountRefundsArgs
}
/**
@@ -980,6 +1087,13 @@ export type BookingCountOutputTypeCountPaymentsArgs<ExtArgs extends runtime.Type
where?: Prisma.PaymentWhereInput
}
/**
* BookingCountOutputType without action
*/
export type BookingCountOutputTypeCountRefundsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.RefundWhereInput
}
export type BookingSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
@@ -995,6 +1109,7 @@ export type BookingSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
participant?: boolean | Prisma.TripParticipantDefaultArgs<ExtArgs>
payments?: boolean | Prisma.Booking$paymentsArgs<ExtArgs>
refunds?: boolean | Prisma.Booking$refundsArgs<ExtArgs>
_count?: boolean | Prisma.BookingCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["booking"]>
@@ -1046,6 +1161,7 @@ export type BookingInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
participant?: boolean | Prisma.TripParticipantDefaultArgs<ExtArgs>
payments?: boolean | Prisma.Booking$paymentsArgs<ExtArgs>
refunds?: boolean | Prisma.Booking$refundsArgs<ExtArgs>
_count?: boolean | Prisma.BookingCountOutputTypeDefaultArgs<ExtArgs>
}
export type BookingIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
@@ -1066,6 +1182,7 @@ export type $BookingPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
user: Prisma.$UserPayload<ExtArgs>
participant: Prisma.$TripParticipantPayload<ExtArgs>
payments: Prisma.$PaymentPayload<ExtArgs>[]
refunds: Prisma.$RefundPayload<ExtArgs>[]
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string
@@ -1475,6 +1592,7 @@ export interface Prisma__BookingClient<T, Null = never, ExtArgs extends runtime.
user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
participant<T extends Prisma.TripParticipantDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TripParticipantDefaultArgs<ExtArgs>>): Prisma.Prisma__TripParticipantClient<runtime.Types.Result.GetResult<Prisma.$TripParticipantPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
payments<T extends Prisma.Booking$paymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Booking$paymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
refunds<T extends Prisma.Booking$refundsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Booking$refundsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RefundPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1937,6 +2055,30 @@ export type Booking$paymentsArgs<ExtArgs extends runtime.Types.Extensions.Intern
distinct?: Prisma.PaymentScalarFieldEnum | Prisma.PaymentScalarFieldEnum[]
}
/**
* Booking.refunds
*/
export type Booking$refundsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Refund
*/
select?: Prisma.RefundSelect<ExtArgs> | null
/**
* Omit specific fields from the Refund
*/
omit?: Prisma.RefundOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.RefundInclude<ExtArgs> | null
where?: Prisma.RefundWhereInput
orderBy?: Prisma.RefundOrderByWithRelationInput | Prisma.RefundOrderByWithRelationInput[]
cursor?: Prisma.RefundWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.RefundScalarFieldEnum | Prisma.RefundScalarFieldEnum[]
}
/**
* Booking without action
*/