fix: partial feedback address
This commit is contained in:
@@ -45,11 +45,11 @@ export default class Capture {
|
||||
|
||||
@BeforeCreate()
|
||||
onCreate() {
|
||||
this.id = generateEntityId(this.id, "cap")
|
||||
this.id = generateEntityId(this.id, "capt")
|
||||
}
|
||||
|
||||
@OnInit()
|
||||
onInit() {
|
||||
this.id = generateEntityId(this.id, "cap")
|
||||
this.id = generateEntityId(this.id, "capt")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
BeforeCreate,
|
||||
Cascade,
|
||||
Collection,
|
||||
Entity,
|
||||
Enum,
|
||||
@@ -54,7 +55,7 @@ type OptionalPaymentCollectionProps =
|
||||
| "completed_at"
|
||||
| DAL.SoftDeletableEntityDateColumns
|
||||
|
||||
@Entity({ tableName: "payment-collection" })
|
||||
@Entity({ tableName: "payment_collection" })
|
||||
@Filter(DALUtils.mikroOrmSoftDeletableFilterOptions)
|
||||
export default class PaymentCollection {
|
||||
[OptionalProps]?: OptionalPaymentCollectionProps
|
||||
@@ -126,22 +127,22 @@ export default class PaymentCollection {
|
||||
payment_providers = new Collection<PaymentProvider>(this)
|
||||
|
||||
@OneToMany(() => PaymentSession, (ps) => ps.payment_collection, {
|
||||
orphanRemoval: true,
|
||||
cascade: [Cascade.REMOVE],
|
||||
})
|
||||
payment_sessions = new Collection<PaymentSession>(this)
|
||||
|
||||
@OneToMany(() => Payment, (payment) => payment.payment_collection, {
|
||||
orphanRemoval: true,
|
||||
cascade: [Cascade.REMOVE],
|
||||
})
|
||||
payments = new Collection<Payment>(this)
|
||||
|
||||
@BeforeCreate()
|
||||
onCreate() {
|
||||
this.id = generateEntityId(this.id, "paycol")
|
||||
this.id = generateEntityId(this.id, "pay_col")
|
||||
}
|
||||
|
||||
@OnInit()
|
||||
onInit() {
|
||||
this.id = generateEntityId(this.id, "paycol")
|
||||
this.id = generateEntityId(this.id, "pay_col")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ type OptionalPaymentMethodTokenProps =
|
||||
| "description_detail"
|
||||
| "metadata"
|
||||
|
||||
@Entity({ tableName: "payment-method-token" })
|
||||
@Entity({ tableName: "payment_method_token" })
|
||||
export default class PaymentMethodToken {
|
||||
[OptionalProps]?: OptionalPaymentMethodTokenProps
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Entity, PrimaryKey, Property } from "@mikro-orm/core"
|
||||
|
||||
@Entity({ tableName: "payment-provider" })
|
||||
@Entity({ tableName: "payment_provider" })
|
||||
export default class PaymentProvider {
|
||||
@PrimaryKey({ columnType: "text" })
|
||||
id: string
|
||||
|
||||
@@ -47,10 +47,10 @@ type OptionalPaymentSessionProps =
|
||||
| "currency_code"
|
||||
| "data"
|
||||
| "is_selected"
|
||||
| "authorised_at"
|
||||
| "authorized_at"
|
||||
| DAL.EntityDateColumns
|
||||
|
||||
@Entity({ tableName: "payment-session" })
|
||||
@Entity({ tableName: "payment_session" })
|
||||
export default class PaymentSession {
|
||||
[OptionalProps]?: OptionalPaymentSessionProps
|
||||
|
||||
@@ -84,7 +84,7 @@ export default class PaymentSession {
|
||||
columnType: "timestamptz",
|
||||
nullable: true,
|
||||
})
|
||||
authorised_at: Date | null
|
||||
authorized_at: Date | null
|
||||
|
||||
@ManyToOne({
|
||||
index: "IDX_payment_session_payment_collection_id",
|
||||
@@ -101,11 +101,11 @@ export default class PaymentSession {
|
||||
|
||||
@BeforeCreate()
|
||||
onCreate() {
|
||||
this.id = generateEntityId(this.id, "ps")
|
||||
this.id = generateEntityId(this.id, "payses")
|
||||
}
|
||||
|
||||
@OnInit()
|
||||
onInit() {
|
||||
this.id = generateEntityId(this.id, "ps")
|
||||
this.id = generateEntityId(this.id, "payses")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
BeforeCreate,
|
||||
Cascade,
|
||||
Collection,
|
||||
Entity,
|
||||
Filter,
|
||||
@@ -103,12 +104,12 @@ export default class Payment {
|
||||
canceled_at: Date | null
|
||||
|
||||
@OneToMany(() => Refund, (refund) => refund.payment, {
|
||||
orphanRemoval: true,
|
||||
cascade: [Cascade.REMOVE],
|
||||
})
|
||||
refunds = new Collection<Refund>(this)
|
||||
|
||||
@OneToMany(() => Capture, (capture) => capture.payment, {
|
||||
orphanRemoval: true,
|
||||
cascade: [Cascade.REMOVE],
|
||||
})
|
||||
captures = new Collection<Capture>(this)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user