From d4582830767110105ff8e198de0b278c5a7091a9 Mon Sep 17 00:00:00 2001 From: fro1991 Date: Fri, 21 Nov 2025 00:39:21 +0900 Subject: [PATCH] update --- src/entity/cif_account.ts | 232 +++++++++++++++++++------------------- 1 file changed, 119 insertions(+), 113 deletions(-) diff --git a/src/entity/cif_account.ts b/src/entity/cif_account.ts index 49b79c8..3ae4a96 100644 --- a/src/entity/cif_account.ts +++ b/src/entity/cif_account.ts @@ -1,140 +1,146 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne, Index } from 'typeorm'; -import { Branch } from './branchs'; -import { Product } from './products'; -import { IncomeTier } from './income_tier'; -import { ClassEconomi } from './class_economi'; -import { District } from './district'; -import { Munisipo } from './munisipo'; -import { Administrativu } from './administrativu'; -import { Suco } from './suco'; -import { Aldeia } from './aldeia'; +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne, Index } from "typeorm"; +import { Branch } from "./branchs"; +import { Product } from "./products"; +import { IncomeTier } from "./income_tier"; +import { ClassEconomi } from "./class_economi"; +import { District } from "./district"; +import { Munisipo } from "./munisipo"; +import { Administrativu } from "./administrativu"; +import { Suco } from "./suco"; +import { Aldeia } from "./aldeia"; -@Entity('cif_account') +@Entity("cif_account") export class CifAccount { - @PrimaryGeneratedColumn('uuid') - id: string; + @PrimaryGeneratedColumn("uuid") + id: string; - @Column({ - nullable: true, - length: 12 - }) - cif_number: string; + @Column({ + nullable: true, + length: 12, + }) + cif_number: string; - @Column({ - nullable: true, - length: 128 - }) - name: string; + @Column({ + nullable: true, + length: 128, + }) + name: string; - @Column({ - nullable: true, - length: 20 - }) - account_number: string; + @Column({ + nullable: true, + length: 20, + }) + account_number: string; - @ManyToOne(() => Branch, { onDelete: "RESTRICT" }) - @JoinColumn() - branch: Branch + @ManyToOne(() => Branch, { onDelete: "RESTRICT" }) + @JoinColumn() + branch: Branch; - @Column({ - nullable: true, - }) - open_date: Date; + @Column({ + nullable: true, + }) + open_date: Date; - @Index() - @Column({ - nullable: false, - }) - position_date: Date; + @Index() + @Column({ + nullable: false, + }) + position_date: Date; - @ManyToOne(() => Product, { onDelete: "RESTRICT" }) - @JoinColumn() - product: Product + @ManyToOne(() => Product, { onDelete: "RESTRICT" }) + @JoinColumn() + product: Product; - @Column({ - type: 'float8', - nullable: true, - }) - current_balance: number; + @Column({ + type: "float8", + nullable: true, + }) + current_balance: number; - @Column({ - nullable: true, - length: 2 - }) - country_code: string; + @Column({ + nullable: true, + length: 2, + }) + country_code: string; - @Column({ - nullable: true, - length: 128 - }) - country_name: string; + @Column({ + nullable: true, + length: 128, + }) + country_name: string; - @Column({ - nullable: true, - length: 128 - }) - exposed_person_flag: string; + @Column({ + nullable: true, + length: 128, + }) + exposed_person_flag: string; - @ManyToOne(() => IncomeTier, { onDelete: "RESTRICT" }) - @JoinColumn() - income_tier: IncomeTier + @ManyToOne(() => IncomeTier, { onDelete: "RESTRICT" }) + @JoinColumn() + income_tier: IncomeTier; - @Column({ - nullable: true, - length: 128 - }) - cif_type: string; + @Column({ + nullable: true, + length: 128, + }) + cif_type: string; - @Column({ - type: 'int2', - nullable: true, - }) - status: number; + @Column({ + type: "int2", + nullable: true, + }) + status: number; - @Column({ - nullable: true, - length: 128 - }) - gender: string; + @Column({ + nullable: true, + length: 128, + }) + gender: string; - @Column({ - nullable: true, - }) - birth_date: Date; + @Column({ + nullable: true, + }) + birth_date: Date; - @ManyToOne(() => ClassEconomi, { onDelete: "RESTRICT" }) - @JoinColumn() - class_economi: ClassEconomi + @Column({ + nullable: true, + type: "float8", + }) + age: Number; - @ManyToOne(() => District, { onDelete: "RESTRICT" }) - @JoinColumn() - district: District + @ManyToOne(() => ClassEconomi, { onDelete: "RESTRICT" }) + @JoinColumn() + class_economi: ClassEconomi; - @ManyToOne(() => Munisipo, { onDelete: "RESTRICT" }) - @JoinColumn() - munisipiu: Munisipo + @ManyToOne(() => District, { onDelete: "RESTRICT" }) + @JoinColumn() + district: District; - @ManyToOne(() => Administrativu, { onDelete: "RESTRICT" }) - @JoinColumn() - administrativu: Administrativu + @ManyToOne(() => Munisipo, { onDelete: "RESTRICT" }) + @JoinColumn() + munisipiu: Munisipo; - @ManyToOne(() => Suco, { onDelete: "RESTRICT" }) - @JoinColumn() - suco: Suco + @ManyToOne(() => Administrativu, { onDelete: "RESTRICT" }) + @JoinColumn() + administrativu: Administrativu; - @ManyToOne(() => Aldeia, { onDelete: "RESTRICT" }) - @JoinColumn() - aldeia: Aldeia + @ManyToOne(() => Suco, { onDelete: "RESTRICT" }) + @JoinColumn() + suco: Suco; - @Column() - @CreateDateColumn() - created_at: Date; + @ManyToOne(() => Aldeia, { onDelete: "RESTRICT" }) + @JoinColumn() + aldeia: Aldeia; - @Column() - @UpdateDateColumn() - updated_at: Date; + @Column() + @CreateDateColumn() + created_at: Date; - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; -} \ No newline at end of file + @Column() + @UpdateDateColumn() + updated_at: Date; + + @Column({ nullable: true }) + @DeleteDateColumn() + deleted_at: Date; +}