update aset

This commit is contained in:
fro1991
2025-04-16 16:26:27 +07:00
parent 35966def5c
commit d8aa311a21
4 changed files with 82 additions and 9 deletions

View File

@ -99,10 +99,10 @@ export class AssetInventory {
department_name: string;
@Column({ type: 'varchar', length: 255, nullable: true })
employement_id: string;
employee_id: string;
@Column({ type: "varchar", length: 255, nullable: true })
employement_name: string;
employee_name: string;
@Column()
@CreateDateColumn()

View File

@ -1,10 +1,4 @@
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, JoinTable, ManyToOne, DeleteDateColumn } from "typeorm";
import { AssetSupplier } from "./asset_supplier";
import { AssetInventoryCondition } from "../types/asset"
import { AssetPurchase } from "./asset_purchase";
import { AssetRequestOrder } from "./asset_request_order";
import { AssetGood } from "./asset_good";
import { Branch } from "./branchs";
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { AssetInventory } from "./asset_inventories";
@Entity("asset_inventory_attributes")

View File

@ -0,0 +1,77 @@
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { AssetInventory } from "./asset_inventories";
import { AssetInventoryCondition } from "../types/asset";
@Entity("asset_inventory_histories")
export class AssetInventoryHistory {
@PrimaryGeneratedColumn("uuid")
id: string;
@ManyToOne(() => AssetInventory, { onDelete: 'RESTRICT' })
@JoinTable()
inventory: AssetInventory;
@Column({ type: 'varchar', length: 255, nullable: true })
branch_id: string;
@Column({ type: 'varchar', length: 255, nullable: true })
branch_code: string;
@Column({ type: 'varchar', length: 255, nullable: true })
branch_name: string;
@Column({ type: 'varchar', length: 255, nullable: true })
department_id: string;
@Column({ type: "varchar", length: 255, nullable: true })
department_name: string;
@Column({ type: 'varchar', length: 255, nullable: true })
employee_id: string;
@Column({ type: "varchar", length: 255, nullable: true })
employee_name: string;
@Column({
nullable: true,
})
start_at: Date;
@Column({ type: "varchar", length: 255, nullable: true })
condition_start: AssetInventoryCondition;
@Column({ type: "varchar", length: 255, nullable: true })
note_start: string;
@Column({
nullable: true,
})
end_at: Date;
@Column({ type: "varchar", length: 255, nullable: true })
condition_end: AssetInventoryCondition;
@Column({ type: "varchar", length: 255, nullable: true })
note_end: string;
@Column()
@CreateDateColumn()
created_at: Date;
@Column({ nullable: true })
@UpdateDateColumn()
updated_at: Date;
@Column({ nullable: true })
@DeleteDateColumn()
deleted_at: Date;
@Column({ type: "varchar", length: 255 })
created_by: string;
@Column({ type: "varchar", length: 255, nullable: true })
updated_by: string;
@Column({ type: "varchar", length: 255, nullable: true })
deleted_by: string;
}

View File

@ -79,6 +79,7 @@ import { AssetPurchaseInvoice } from "./entity/asset_purchase_invoice";
import { AssetInventoryCondition } from "./types/asset"
import { AssetInventory } from "./entity/asset_inventories";
import { AssetInventoryAttribute } from "./entity/asset_inventory_attributes";
import { AssetInventoryHistory } from "./entity/asset_inventory_histories";
import { RemitOtp } from "./entity/remit_otp";
import { RemitPartnerUser } from "./entity/remit_partner_users";
import { RemitPartner } from "./entity/remit_partners";
@ -176,6 +177,7 @@ export {
AssetInventoryCondition,
AssetInventory,
AssetInventoryAttribute,
AssetInventoryHistory,
RemitOtp,
RemitPartnerUser,
RemitPartner,