This commit is contained in:
fro1991
2025-11-21 00:39:21 +09:00
parent 879a15c351
commit d458283076

View File

@ -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;
}
@Column()
@UpdateDateColumn()
updated_at: Date;
@Column({ nullable: true })
@DeleteDateColumn()
deleted_at: Date;
}