update eform
This commit is contained in:
@ -15,10 +15,6 @@ export class EformBeneficialOwner {
|
|||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@ManyToOne(() => EformRequest, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
request: EformRequest;
|
|
||||||
|
|
||||||
@ManyToOne(() => EformConfigRelation, { onDelete: "NO ACTION", nullable: true })
|
@ManyToOne(() => EformConfigRelation, { onDelete: "NO ACTION", nullable: true })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
relation: EformConfigRelation;
|
relation: EformConfigRelation;
|
||||||
|
|||||||
@ -11,10 +11,6 @@ export class EformEmergencyContact {
|
|||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@ManyToOne(() => EformRequest, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
request: EformRequest;
|
|
||||||
|
|
||||||
@ManyToOne(() => EformConfigRelation, { onDelete: "NO ACTION", nullable: true })
|
@ManyToOne(() => EformConfigRelation, { onDelete: "NO ACTION", nullable: true })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
relation: EformConfigRelation;
|
relation: EformConfigRelation;
|
||||||
|
|||||||
@ -9,10 +9,6 @@ export class EformFinancial {
|
|||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@ManyToOne(() => EformRequest, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
request: EformRequest;
|
|
||||||
|
|
||||||
@ManyToOne(() => EformConfigSourceIncome, { onDelete: "NO ACTION", nullable: true })
|
@ManyToOne(() => EformConfigSourceIncome, { onDelete: "NO ACTION", nullable: true })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
source_income: EformConfigSourceIncome;
|
source_income: EformConfigSourceIncome;
|
||||||
|
|||||||
@ -12,10 +12,6 @@ export class EformJob {
|
|||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@ManyToOne(() => EformRequest, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
request: EformRequest;
|
|
||||||
|
|
||||||
@ManyToOne(() => EformConfigOccupation, { onDelete: "NO ACTION", nullable: true })
|
@ManyToOne(() => EformConfigOccupation, { onDelete: "NO ACTION", nullable: true })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
occupation: EformConfigOccupation;
|
occupation: EformConfigOccupation;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
import { EformPersonal } from "./eform_personals";
|
import { EformPersonal } from "./eform_personals";
|
||||||
import { EformRegionMunisipo } from "./eform_region_munisipos";
|
import { EformRegionMunisipo } from "./eform_region_munisipos";
|
||||||
import { EformRegionAdministrativu } from "./eform_region_administrativus";
|
import { EformRegionAdministrativu } from "./eform_region_administrativus";
|
||||||
@ -10,8 +10,7 @@ export class EformPersonalDomicileAddress {
|
|||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@ManyToOne(() => EformPersonal, { onDelete: "NO ACTION", nullable: true })
|
@OneToOne(() => EformPersonal, (personal) => personal.personal_domicile_address, { onDelete: "CASCADE" })
|
||||||
@JoinColumn()
|
|
||||||
personal: EformPersonal;
|
personal: EformPersonal;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export class EformPersonalIdentity {
|
|||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@ManyToOne(() => EformPersonal, { onDelete: "NO ACTION", nullable: true })
|
@ManyToOne(() => EformPersonal, (personal) => personal.personal_identities, { onDelete: "CASCADE" })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
personal: EformPersonal;
|
personal: EformPersonal;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
import { EformPersonal } from "./eform_personals";
|
import { EformPersonal } from "./eform_personals";
|
||||||
import { EformRegionMunisipo } from "./eform_region_munisipos";
|
import { EformRegionMunisipo } from "./eform_region_munisipos";
|
||||||
import { EformRegionAdministrativu } from "./eform_region_administrativus";
|
import { EformRegionAdministrativu } from "./eform_region_administrativus";
|
||||||
@ -10,8 +10,7 @@ export class EformPersonalMainAddress {
|
|||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@ManyToOne(() => EformPersonal, { onDelete: "NO ACTION", nullable: true })
|
@OneToOne(() => EformPersonal, (personal) => personal.personal_main_address, { onDelete: "CASCADE" })
|
||||||
@JoinColumn()
|
|
||||||
personal: EformPersonal;
|
personal: EformPersonal;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
|
|||||||
@ -1,20 +1,18 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToMany, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToMany, ManyToOne, OneToMany, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
import { EformGender } from "../types/eform";
|
import { EformGender } from "../types/eform";
|
||||||
import { EformConfigNationality } from "./eform_config_nationalities";
|
import { EformConfigNationality } from "./eform_config_nationalities";
|
||||||
import { EformConfigEducation } from "./eform_config_educations";
|
import { EformConfigEducation } from "./eform_config_educations";
|
||||||
import { EformPersonalIdentity } from "./eform_personal_identities";
|
import { EformPersonalIdentity } from "./eform_personal_identities";
|
||||||
import { EformConfigMarital } from "./eform_config_maritals";
|
import { EformConfigMarital } from "./eform_config_maritals";
|
||||||
import { EformRequest } from "./eform_requests";
|
import { EformRequest } from "./eform_requests";
|
||||||
|
import { EformPersonalMainAddress } from "./eform_personal_main_addresses";
|
||||||
|
import { EformPersonalDomicileAddress } from "./eform_personal_domicile_addresses";
|
||||||
|
|
||||||
@Entity("eform_personals", { schema: "eforms" })
|
@Entity("eform_personals", { schema: "eforms" })
|
||||||
export class EformPersonal {
|
export class EformPersonal {
|
||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
@ManyToOne(() => EformRequest, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
request: EformRequest;
|
|
||||||
|
|
||||||
@ManyToOne(() => EformConfigNationality, { onDelete: "NO ACTION", nullable: true })
|
@ManyToOne(() => EformConfigNationality, { onDelete: "NO ACTION", nullable: true })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
nationality: EformConfigNationality;
|
nationality: EformConfigNationality;
|
||||||
@ -106,9 +104,21 @@ export class EformPersonal {
|
|||||||
})
|
})
|
||||||
faximilie: string;
|
faximilie: string;
|
||||||
|
|
||||||
@ManyToMany(() => EformPersonalIdentity, (identity) => identity.personal)
|
@OneToMany(() => EformPersonalIdentity, (identity) => identity.personal, { cascade: true })
|
||||||
personal_identities: EformPersonalIdentity[];
|
personal_identities: EformPersonalIdentity[];
|
||||||
|
|
||||||
|
@OneToOne(() => EformPersonalMainAddress, (main_address) => main_address.personal, { cascade: true })
|
||||||
|
@JoinColumn()
|
||||||
|
personal_main_address: EformPersonalMainAddress;
|
||||||
|
|
||||||
|
@OneToOne(() => EformPersonalDomicileAddress, (domicile_address) => domicile_address.personal, { cascade: true })
|
||||||
|
@JoinColumn()
|
||||||
|
personal_domicile_address: EformPersonalDomicileAddress;
|
||||||
|
|
||||||
|
@ManyToOne(() => EformPersonal, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
parent: EformPersonal;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -3,6 +3,11 @@ import { EformRequestAggrementType, EformRequestProductName, EformRequestProduct
|
|||||||
import { Branch } from "./branchs";
|
import { Branch } from "./branchs";
|
||||||
import { EformAccount } from "./eform_accounts";
|
import { EformAccount } from "./eform_accounts";
|
||||||
import { EformCif } from "./eform_cifs";
|
import { EformCif } from "./eform_cifs";
|
||||||
|
import { EformPersonal } from "./eform_personals";
|
||||||
|
import { EformBeneficialOwner } from "./eform_beneficial_owners";
|
||||||
|
import { EformEmergencyContact } from "./eform_emergency_contacts";
|
||||||
|
import { EformFinancial } from "./eform_financials";
|
||||||
|
import { EformJob } from "./eform_jobs";
|
||||||
|
|
||||||
@Entity("eform_requests", { schema: "eforms" })
|
@Entity("eform_requests", { schema: "eforms" })
|
||||||
export class EformRequest {
|
export class EformRequest {
|
||||||
@ -87,6 +92,26 @@ export class EformRequest {
|
|||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
branch: Branch;
|
branch: Branch;
|
||||||
|
|
||||||
|
@ManyToOne(() => EformJob, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
job: EformJob;
|
||||||
|
|
||||||
|
@ManyToOne(() => EformEmergencyContact, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
emergency_contact: EformEmergencyContact;
|
||||||
|
|
||||||
|
@ManyToOne(() => EformFinancial, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
financial: EformFinancial;
|
||||||
|
|
||||||
|
@ManyToOne(() => EformBeneficialOwner, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
beneficial_owner: EformBeneficialOwner;
|
||||||
|
|
||||||
|
@ManyToOne(() => EformPersonal, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
personal: EformPersonal;
|
||||||
|
|
||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
opened_at: Date;
|
opened_at: Date;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user