feat(payment): provider service (#6308)
This commit is contained in:
@@ -43,19 +43,21 @@ export default class PaymentCollection {
|
||||
})
|
||||
amount: number
|
||||
|
||||
@Property({
|
||||
columnType: "numeric",
|
||||
nullable: true,
|
||||
serializer: optionalNumericSerializer,
|
||||
})
|
||||
authorized_amount: number | null = null
|
||||
// TODO: make this computed properties
|
||||
|
||||
@Property({
|
||||
columnType: "numeric",
|
||||
nullable: true,
|
||||
serializer: optionalNumericSerializer,
|
||||
})
|
||||
refunded_amount: number | null = null
|
||||
// @Property({
|
||||
// columnType: "numeric",
|
||||
// nullable: true,
|
||||
// serializer: optionalNumericSerializer,
|
||||
// })
|
||||
// authorized_amount: number | null = null
|
||||
//
|
||||
// @Property({
|
||||
// columnType: "numeric",
|
||||
// nullable: true,
|
||||
// serializer: optionalNumericSerializer,
|
||||
// })
|
||||
// refunded_amount: number | null = null
|
||||
|
||||
@Property({ columnType: "text", index: "IDX_payment_collection_region_id" })
|
||||
region_id: string
|
||||
|
||||
@@ -16,7 +16,7 @@ import Payment from "./payment"
|
||||
|
||||
@Entity({ tableName: "payment_session" })
|
||||
export default class PaymentSession {
|
||||
[OptionalProps]?: "status"
|
||||
[OptionalProps]?: "status" | "data"
|
||||
|
||||
@PrimaryKey({ columnType: "text" })
|
||||
id: string
|
||||
@@ -33,8 +33,8 @@ export default class PaymentSession {
|
||||
@Property({ columnType: "text" })
|
||||
provider_id: string
|
||||
|
||||
@Property({ columnType: "jsonb", nullable: true })
|
||||
data: Record<string, unknown> | null = null
|
||||
@Property({ columnType: "jsonb" })
|
||||
data: Record<string, unknown> = {}
|
||||
|
||||
@Enum({
|
||||
items: () => PaymentSessionStatus,
|
||||
|
||||
Reference in New Issue
Block a user