diff --git a/src/entity/trx_customer_costs.ts b/src/entity/trx_customer_costs.ts index 0543263..97a6579 100644 --- a/src/entity/trx_customer_costs.ts +++ b/src/entity/trx_customer_costs.ts @@ -1,6 +1,6 @@ import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; import { Status } from "../types/status"; -import { TrxCostType, TrxCustomerType } from "../types/trx"; +import { TrxCostCode, TrxCostType } from "../types/trx"; import { TrxCustomer } from "./trx_customers"; @Entity("trx_customer_cost", { schema: "trx" }) @@ -14,9 +14,9 @@ export class TrxCustomerCost { @Column({ nullable: false, - length: 4096, + length: 256, }) - type: TrxCostType; + code: TrxCostCode; @Column({ nullable: false, @@ -30,11 +30,17 @@ export class TrxCustomerCost { }) max_amount: number; + @Column({ + nullable: false, + length: 256, + }) + type: TrxCostType; + @Column({ nullable: false, type: "float8", }) - percentage: number; + cost: number; @Column({ nullable: true, diff --git a/src/types/trx.ts b/src/types/trx.ts index 0ef0af9..5d9600e 100644 --- a/src/types/trx.ts +++ b/src/types/trx.ts @@ -25,10 +25,17 @@ export enum TrxCustomerType { "business" = "business", } +export enum TrxCostCode { + "BRI_ID_IDR" = "BRI_ID_IDR", + "BRI_ID_USD" = "BRI_ID_USD", + "OTHER_ID_IDR" = "OTHER_ID_IDR", + "OTHER_ID_USD" = "OTHER_ID_USD", + "OTHER_WW_USD" = "OTHER_WW_USD", +} + export enum TrxCostType { - "domestic" = "domestic", - "remittance" = "remittance", - "swift" = "swift", + "fix" = "fix", + "percentage" = "percentage", } export enum TrxTransactionStatus {