From 1ba7c76958d6b66b3e5bf34ef30cc5b53195579d Mon Sep 17 00:00:00 2001 From: fro1991 Date: Fri, 25 Apr 2025 16:51:49 +0700 Subject: [PATCH] update asset --- src/entity/asset_inventory_depreciation_logs.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/entity/asset_inventory_depreciation_logs.ts b/src/entity/asset_inventory_depreciation_logs.ts index f50f78a..165c771 100644 --- a/src/entity/asset_inventory_depreciation_logs.ts +++ b/src/entity/asset_inventory_depreciation_logs.ts @@ -1,11 +1,16 @@ import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; import { AssetInventory } from "./asset_inventories"; +import { AssetInventoryDepreciation } from "./asset_inventory_depreciations"; @Entity("asset_inventory_depreciation_logs") export class AssetInventoryDepreciationLog { @PrimaryGeneratedColumn("uuid") id: string; + @ManyToOne(() => AssetInventoryDepreciation, { onDelete: 'RESTRICT' }) + @JoinTable() + depreciation: AssetInventoryDepreciation; + @ManyToOne(() => AssetInventory, { onDelete: 'RESTRICT' }) @JoinTable() inventory: AssetInventory;