This commit is contained in:
fro1991
2025-10-20 22:06:22 +07:00
parent 0fd056ad97
commit 9cdb2dcdfb
2 changed files with 20 additions and 7 deletions

View File

@ -1,6 +1,6 @@
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { Status } from "../types/status"; import { Status } from "../types/status";
import { TrxCostType, TrxCustomerType } from "../types/trx"; import { TrxCostCode, TrxCostType } from "../types/trx";
import { TrxCustomer } from "./trx_customers"; import { TrxCustomer } from "./trx_customers";
@Entity("trx_customer_cost", { schema: "trx" }) @Entity("trx_customer_cost", { schema: "trx" })
@ -14,9 +14,9 @@ export class TrxCustomerCost {
@Column({ @Column({
nullable: false, nullable: false,
length: 4096, length: 256,
}) })
type: TrxCostType; code: TrxCostCode;
@Column({ @Column({
nullable: false, nullable: false,
@ -30,11 +30,17 @@ export class TrxCustomerCost {
}) })
max_amount: number; max_amount: number;
@Column({
nullable: false,
length: 256,
})
type: TrxCostType;
@Column({ @Column({
nullable: false, nullable: false,
type: "float8", type: "float8",
}) })
percentage: number; cost: number;
@Column({ @Column({
nullable: true, nullable: true,

View File

@ -25,10 +25,17 @@ export enum TrxCustomerType {
"business" = "business", "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 { export enum TrxCostType {
"domestic" = "domestic", "fix" = "fix",
"remittance" = "remittance", "percentage" = "percentage",
"swift" = "swift",
} }
export enum TrxTransactionStatus { export enum TrxTransactionStatus {