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 { 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,

View File

@ -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 {