This commit is contained in:
fro1991
2025-10-20 23:19:33 +07:00
parent a1c20fd050
commit 2b42b427e2
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,42 @@
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { TrxCurrency } from "./trx_currencies";
@Entity("trx_currency_rates", { schema: "trx" })
export class TrxCurrencyRates {
@PrimaryGeneratedColumn("uuid")
id: string;
@ManyToOne(() => TrxCurrency, { onDelete: "NO ACTION" })
@JoinColumn()
base: TrxCurrency;
@ManyToOne(() => TrxCurrency, { onDelete: "NO ACTION" })
@JoinColumn()
target: TrxCurrency;
@Column({
type: "float8",
})
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;
}

View File

@ -9,4 +9,5 @@ export * from "../entity/trx_countries";
export * from "../entity/trx_currencies"; export * from "../entity/trx_currencies";
export * from "../entity/trx_banks"; export * from "../entity/trx_banks";
export * from "../entity/trx_bank_swifts"; export * from "../entity/trx_bank_swifts";
export * from "../entity/trx_currency_rates";
export * from "../types/trx"; export * from "../types/trx";