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