This commit is contained in:
fro1991
2025-10-18 14:46:07 +07:00
parent 204308e69c
commit 6df19e1d18
3 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,46 @@
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { Status } from "../types/status";
import { TrxBank } from "./trx_banks";
@Entity("trx_bank_swifts", { schema: "trx" })
export class TrxBankSwift {
@PrimaryGeneratedColumn("uuid")
id: string;
@ManyToOne(() => TrxBank, { onDelete: "RESTRICT" })
@JoinColumn()
bank: TrxBank;
@Column({
nullable: true,
length: 256,
})
code: string;
@Column({
nullable: true,
length: 64,
})
status: Status;
@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;
}

47
src/entity/trx_banks.ts Normal file
View File

@ -0,0 +1,47 @@
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { Status } from "../types/status";
@Entity("trx_banks", { schema: "trx" })
export class TrxBank {
@PrimaryGeneratedColumn("uuid")
id: string;
@Column({
nullable: true,
length: 256,
})
name: string;
@Column({
nullable: false,
length: 256,
})
country: string;
@Column({
nullable: true,
length: 64,
})
status: Status;
@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;
}

View File

@ -50,4 +50,6 @@ export * from "../entity/trx_customer_users";
export * from "../entity/trx_customer_user_refresh_tokens";
export * from "../entity/trx_customer_user_activities";
export * from "../entity/trx_customer_costs";
export * from "../entity/trx_banks";
export * from "../entity/trx_bank_swifts";
export * from "../types/trx";