update
This commit is contained in:
39
src/entity/trx_transaction_deal_codes.ts
Normal file
39
src/entity/trx_transaction_deal_codes.ts
Normal file
@ -0,0 +1,39 @@
|
||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
|
||||
@Entity("trx_transaction_deal_codes", { schema: "trx" })
|
||||
export class TrxTransactionDealCode {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
length: 256,
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
type: "float8",
|
||||
default: 0,
|
||||
})
|
||||
rate: number;
|
||||
|
||||
@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;
|
||||
}
|
||||
@ -9,6 +9,7 @@ import { TrxCustomerUser } from "./trx_customer_users";
|
||||
import { TrxTransactionPosition, TrxTransactionStatus, TrxTransactionType } from "../types/trx";
|
||||
import { TrxVerification } from "./trx_verifications";
|
||||
import { TrxPurposes } from "./trx_purposes";
|
||||
import { TrxTransactionDealCode } from "./trx_transaction_deal_codes";
|
||||
|
||||
@Entity("trx_transactions", { schema: "trx" })
|
||||
export class TrxTransaction {
|
||||
@ -28,6 +29,10 @@ export class TrxTransaction {
|
||||
})
|
||||
type: TrxTransactionType;
|
||||
|
||||
@ManyToOne(() => TrxTransactionDealCode, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
deal_code: TrxTransactionDealCode;
|
||||
|
||||
@ManyToOne(() => TrxCustomer, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
customer: TrxCustomer;
|
||||
|
||||
@ -18,6 +18,7 @@ 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_deal_codes";
|
||||
export * from "../entity/trx_transaction_slas";
|
||||
export * from "../entity/trx_transaction_amls";
|
||||
export * from "../entity/trx_transaction_signatures";
|
||||
|
||||
Reference in New Issue
Block a user