update
This commit is contained in:
64
src/entity/trx_transaction_activities.ts
Normal file
64
src/entity/trx_transaction_activities.ts
Normal file
@ -0,0 +1,64 @@
|
||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
import { TrxTransactionPosition, TrxTransactionStatus } from "../types/trx";
|
||||
import { TrxTransaction } from "./trx_transactions";
|
||||
|
||||
@Entity("trx_transaction_activities", { schema: "trx" })
|
||||
export class TrxTransactionActivity {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@ManyToOne(() => TrxTransaction, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
transaction: TrxTransaction;
|
||||
|
||||
@Column({
|
||||
length: 256,
|
||||
})
|
||||
activity_by: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
activity_at: Date;
|
||||
|
||||
@Column({
|
||||
length: 256,
|
||||
})
|
||||
position_before: TrxTransactionPosition;
|
||||
|
||||
@Column({
|
||||
length: 256,
|
||||
})
|
||||
status_before: TrxTransactionStatus;
|
||||
|
||||
@Column({
|
||||
length: 256,
|
||||
})
|
||||
position_after: TrxTransactionPosition;
|
||||
|
||||
@Column({
|
||||
length: 256,
|
||||
})
|
||||
status_after: TrxTransactionStatus;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
created_by: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
updated_by: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@DeleteDateColumn()
|
||||
deleted_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
deleted_by: string;
|
||||
}
|
||||
@ -6,10 +6,10 @@ import { TrxReceiver } from "./trx_receivers";
|
||||
import { TrxCurrencyRate } from "./trx_currency_rates";
|
||||
import { TrxCustomerCost } from "./trx_customer_costs";
|
||||
import { TrxCustomerUser } from "./trx_customer_users";
|
||||
import { TrxTransactionType } from "../types/trx";
|
||||
import { TrxTransactionPosition, TrxTransactionStatus, TrxTransactionType } from "../types/trx";
|
||||
|
||||
@Entity("trx_transactions", { schema: "trx" })
|
||||
export class TrxTransactions {
|
||||
export class TrxTransaction {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@ -79,7 +79,41 @@ export class TrxTransactions {
|
||||
nullable: true,
|
||||
length: 256,
|
||||
})
|
||||
file: string;
|
||||
news: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
})
|
||||
underlying_file: string;
|
||||
|
||||
@Column({
|
||||
length: 256,
|
||||
})
|
||||
position: TrxTransactionPosition;
|
||||
|
||||
@Column({
|
||||
length: 256,
|
||||
})
|
||||
status: TrxTransactionStatus;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
})
|
||||
remark: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
})
|
||||
settlement_file: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 4096,
|
||||
})
|
||||
note: string;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
|
||||
@ -11,4 +11,6 @@ export * from "../entity/trx_currency_rates";
|
||||
export * from "../entity/trx_banks";
|
||||
export * from "../entity/trx_bank_swifts";
|
||||
export * from "../entity/trx_receivers";
|
||||
export * from "../entity/trx_transactions";
|
||||
export * from "../entity/trx_transaction_activities";
|
||||
export * from "../types/trx";
|
||||
|
||||
@ -49,12 +49,28 @@ export enum TrxTransactionType {
|
||||
"swift" = "swift",
|
||||
}
|
||||
|
||||
export enum TrxTransactionPosition {
|
||||
"customer_draft" = "customer_draft",
|
||||
"bri_pending_deal_request" = "bri_pending_deal_request",
|
||||
"customer_pending_deal_approve" = "customer_pending_deal_approve",
|
||||
"customer_pending_checker" = "customer_pending_checker",
|
||||
"customer_pending_signer" = "customer_pending_signer",
|
||||
"bri_process_settlement" = "bri_process_settlement",
|
||||
"customer_success" = "customer_success",
|
||||
"customer_reject" = "customer_reject",
|
||||
"custoemr_cancel" = "custoemr_cancel",
|
||||
}
|
||||
|
||||
export enum TrxTransactionStatus {
|
||||
"draft" = "draft",
|
||||
"pending_deal" = "pending_deal",
|
||||
"pending_deal_request" = "pending_deal_request",
|
||||
"pending_deal_approve" = "pending_deal_approve",
|
||||
"pending_checker" = "pending_checker",
|
||||
"pending_signer" = "pending_signer",
|
||||
"process_setlement" = "process_setlement",
|
||||
"process_settlement" = "process_settlement",
|
||||
"success" = "success",
|
||||
"reject" = "reject",
|
||||
"cancel" = "cancel",
|
||||
}
|
||||
|
||||
////
|
||||
|
||||
Reference in New Issue
Block a user