chore: update fields to new convention
This commit is contained in:
@@ -41,7 +41,7 @@ export default class Capture {
|
||||
created_at: Date
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
created_by?: string | null
|
||||
created_by: string | null = null
|
||||
|
||||
@BeforeCreate()
|
||||
onCreate() {
|
||||
|
||||
@@ -48,14 +48,14 @@ export default class PaymentCollection {
|
||||
nullable: true,
|
||||
serializer: optionalNumericSerializer,
|
||||
})
|
||||
authorized_amount?: number | null
|
||||
authorized_amount: number | null = null
|
||||
|
||||
@Property({
|
||||
columnType: "numeric",
|
||||
nullable: true,
|
||||
serializer: optionalNumericSerializer,
|
||||
})
|
||||
refunded_amount?: number | null
|
||||
refunded_amount: number | null = null
|
||||
|
||||
@Property({ columnType: "text", index: "IDX_payment_collection_region_id" })
|
||||
region_id: string
|
||||
@@ -80,13 +80,13 @@ export default class PaymentCollection {
|
||||
nullable: true,
|
||||
index: "IDX_payment_collection_deleted_at",
|
||||
})
|
||||
deleted_at?: Date | null
|
||||
deleted_at: Date | null = null
|
||||
|
||||
@Property({
|
||||
columnType: "timestamptz",
|
||||
nullable: true,
|
||||
})
|
||||
completed_at?: Date | null
|
||||
completed_at: Date | null = null
|
||||
|
||||
@Enum({
|
||||
items: () => PaymentCollectionStatus,
|
||||
|
||||
@@ -17,19 +17,19 @@ export default class PaymentMethodToken {
|
||||
provider_id: string
|
||||
|
||||
@Property({ columnType: "jsonb", nullable: true })
|
||||
data?: Record<string, unknown> | null
|
||||
data: Record<string, unknown> | null = null
|
||||
|
||||
@Property({ columnType: "text" })
|
||||
name: string
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
type_detail?: string | null
|
||||
type_detail: string | null = null
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
description_detail?: string | null
|
||||
description_detail: string | null = null
|
||||
|
||||
@Property({ columnType: "jsonb", nullable: true })
|
||||
metadata?: Record<string, unknown> | null
|
||||
metadata: Record<string, unknown> | null = null
|
||||
|
||||
@BeforeCreate()
|
||||
onCreate() {
|
||||
|
||||
@@ -31,7 +31,7 @@ export default class PaymentSession {
|
||||
provider_id: string
|
||||
|
||||
@Property({ columnType: "jsonb", nullable: true })
|
||||
data?: Record<string, unknown> | null
|
||||
data: Record<string, unknown> | null = null
|
||||
|
||||
@Enum({
|
||||
items: () => PaymentSessionStatus,
|
||||
@@ -42,7 +42,7 @@ export default class PaymentSession {
|
||||
columnType: "timestamptz",
|
||||
nullable: true,
|
||||
})
|
||||
authorized_at?: Date | null
|
||||
authorized_at: Date | null = null
|
||||
|
||||
@ManyToOne({
|
||||
index: "IDX_payment_session_payment_collection_id",
|
||||
|
||||
@@ -45,7 +45,7 @@ export default class Payment {
|
||||
nullable: true,
|
||||
serializer: optionalNumericSerializer,
|
||||
})
|
||||
authorized_amount?: number | null
|
||||
authorized_amount: number | null = null
|
||||
|
||||
@Property({ columnType: "text" })
|
||||
currency_code: string
|
||||
@@ -54,19 +54,19 @@ export default class Payment {
|
||||
provider_id: string
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
cart_id?: string | null
|
||||
cart_id: string | null = null
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
order_id?: string | null
|
||||
order_id: string | null = null
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
order_edit_id?: string | null
|
||||
order_edit_id: string | null = null
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
customer_id?: string | null
|
||||
customer_id: string | null = null
|
||||
|
||||
@Property({ columnType: "jsonb", nullable: true })
|
||||
data?: Record<string, unknown> | null
|
||||
data: Record<string, unknown> | null = null
|
||||
|
||||
@Property({
|
||||
onCreate: () => new Date(),
|
||||
@@ -88,19 +88,19 @@ export default class Payment {
|
||||
nullable: true,
|
||||
index: "IDX_payment_deleted_at",
|
||||
})
|
||||
deleted_at?: Date | null
|
||||
deleted_at: Date | null = null
|
||||
|
||||
@Property({
|
||||
columnType: "timestamptz",
|
||||
nullable: true,
|
||||
})
|
||||
captured_at?: Date | null
|
||||
captured_at: Date | null = null
|
||||
|
||||
@Property({
|
||||
columnType: "timestamptz",
|
||||
nullable: true,
|
||||
})
|
||||
canceled_at?: Date | null
|
||||
canceled_at: Date | null = null
|
||||
|
||||
@OneToMany(() => Refund, (refund) => refund.payment, {
|
||||
cascade: [Cascade.REMOVE],
|
||||
|
||||
@@ -36,7 +36,7 @@ export default class Refund {
|
||||
created_at: Date
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
created_by?: string | null
|
||||
created_by: string | null = null
|
||||
|
||||
@BeforeCreate()
|
||||
onCreate() {
|
||||
|
||||
Reference in New Issue
Block a user