mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 18:48:11 +00:00
telebirr configured
This commit is contained in:
@@ -3,7 +3,7 @@ import { BaseEntity, Column, CreateDateColumn, Entity, PrimaryGeneratedColumn }
|
||||
|
||||
type PaymentType = "booking"
|
||||
type PaymentMethod = "telebirr" | "cbe-birr" | "ebirr"
|
||||
type Currency = "etb" | "usd"
|
||||
type Currency = "ETB" | "USD"
|
||||
type PaymentStatus = "action-required" | "processing" | "success" | "failed" | "canceled" | "refunded"
|
||||
|
||||
@Entity({ schema: 'freight', name: 'payments' })
|
||||
@@ -14,26 +14,26 @@ export class PaymentEntity extends BaseEntity {
|
||||
@Column({ type: 'varchar', length: 255, name: "ref_id" })
|
||||
refId!: string
|
||||
|
||||
@Column({ type: 'varchar', length: 255, name: "table_id" })
|
||||
tableId!: string
|
||||
|
||||
@Column({ type: "enum", enum: ["booking"] })
|
||||
type!: PaymentType;
|
||||
|
||||
@Column({ type: "enum", enum: ["telebirr", "cbe-birr", "ebirr"] })
|
||||
method!: PaymentMethod
|
||||
|
||||
@Column({ type: "enum", enum: ["etb", "usd"] })
|
||||
@Column({ type: "enum", enum: ["ETB", "USD"] })
|
||||
currency!: Currency
|
||||
|
||||
@Column({ type: "numeric" })
|
||||
amount!: number
|
||||
|
||||
@Column({ type: "json", name: "client_action" })
|
||||
clientAction?: string;
|
||||
@Column({ type: "jsonb", default: {}, name: "raw_initiation" })
|
||||
rawInitiation?: Record<string, unknown>
|
||||
|
||||
@Column({ type: "jsonb", name: "client_action" })
|
||||
clientAction?: Record<string, unknown>;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true, name: "merchant_order_id", })
|
||||
merchantOrderId?: string
|
||||
merchantOrderId!: string
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true, name: "transaction_id", })
|
||||
transactionId?: string
|
||||
@@ -44,9 +44,12 @@ export class PaymentEntity extends BaseEntity {
|
||||
@Column({ type: "date", nullable: true, name: "paid_at" })
|
||||
paidAt?: Date
|
||||
|
||||
@Column({ type: "date", nullable: true, name: "refunded_at" })
|
||||
@Column({ type: "timestamp", nullable: true, name: "refunded_at" })
|
||||
refundedAt?: Date
|
||||
|
||||
@Column({ type: "timestamp", nullable: true, name: "expires_at" })
|
||||
expiresAt?: Date
|
||||
|
||||
@Column({ type: "varchar", length: 30, nullable: true, name: "failer_code" })
|
||||
failerCode?: string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user