-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
schema.prisma: Rename Payments to Payment
As the name of the model is used as a type, the acceptednaming convention is to name that type in singular way
- Loading branch information
1 parent
7e37d19
commit 3a63238
Showing
19 changed files
with
154 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
apps/api/src/domain/generated/payment/dto/connect-payment.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export class ConnectPaymentDto { | ||
id?: string | ||
extPaymentIntentId?: string | ||
} |
12 changes: 12 additions & 0 deletions
12
apps/api/src/domain/generated/payment/dto/create-payment.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { PaymentType } from '@prisma/client' | ||
import { ApiProperty } from '@nestjs/swagger' | ||
|
||
export class CreatePaymentDto { | ||
extCustomerId: string | ||
extPaymentIntentId: string | ||
extPaymentMethodId: string | ||
@ApiProperty({ enum: PaymentType }) | ||
type: PaymentType | ||
billingEmail?: string | ||
billingName?: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './connect-payment.dto' | ||
export * from './create-payment.dto' | ||
export * from './update-payment.dto' |
12 changes: 12 additions & 0 deletions
12
apps/api/src/domain/generated/payment/dto/update-payment.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { PaymentType } from '@prisma/client' | ||
import { ApiProperty } from '@nestjs/swagger' | ||
|
||
export class UpdatePaymentDto { | ||
extCustomerId?: string | ||
extPaymentIntentId?: string | ||
extPaymentMethodId?: string | ||
@ApiProperty({ enum: PaymentType }) | ||
type?: PaymentType | ||
billingEmail?: string | ||
billingName?: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './payment.entity' |
23 changes: 23 additions & 0 deletions
23
apps/api/src/domain/generated/payment/entities/payment.entity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { PaymentType, Currency, PaymentStatus, PaymentProvider } from '@prisma/client' | ||
import { Affiliate } from '../../affiliate/entities/affiliate.entity' | ||
import { Donation } from '../../donation/entities/donation.entity' | ||
|
||
export class Payment { | ||
id: string | ||
extCustomerId: string | ||
extPaymentIntentId: string | ||
extPaymentMethodId: string | ||
type: PaymentType | ||
currency: Currency | ||
status: PaymentStatus | ||
provider: PaymentProvider | ||
affiliateId: string | null | ||
createdAt: Date | ||
updatedAt: Date | null | ||
chargedAmount: number | ||
amount: number | ||
billingEmail: string | null | ||
billingName: string | null | ||
affiliate?: Affiliate | null | ||
donations?: Donation[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.