This commit is contained in:
2025-12-17 13:05:53 +07:00
parent f7374c2abd
commit 0685ce6677
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,46 @@
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { Branch } from "./branchs";
import { TrxCustomerAccount } from "./trx_customer_accounts";
@Entity("trx_customer_account_balances", { schema: "trx" })
export class TrxCustomerAccountBalance {
@PrimaryGeneratedColumn("uuid")
id: string;
@ManyToOne(() => TrxCustomerAccount, { onDelete: "RESTRICT" })
@JoinColumn()
customer_account: TrxCustomerAccount;
@Column({
nullable: true,
type: "float8",
})
balance: number;
@Column({
nullable: true,
})
position_date: Date;
@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

@ -3,6 +3,7 @@ export * from "../entity/trx_occupations";
export * from "../entity/trx_verifications";
export * from "../entity/trx_customers";
export * from "../entity/trx_customer_accounts";
export * from "../entity/trx_customer_account_balances";
export * from "../entity/trx_customer_users";
export * from "../entity/trx_customer_user_signatures";
export * from "../entity/trx_customer_user_refresh_tokens";