update eform type

This commit is contained in:
2025-08-19 07:30:57 +07:00
parent 49604ca9a4
commit 980914161d
10 changed files with 186 additions and 11 deletions

View File

@ -0,0 +1,64 @@
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { EformBeneficialOwner } from "./eform_beneficial_owners";
import { EformIdentityType } from "../types/eform";
@Entity("eform_beneficial_owner_identities", { schema: "eforms" })
export class EformBeneficialOwnerIdentity {
@PrimaryGeneratedColumn("uuid")
id: string;
@ManyToOne(() => EformBeneficialOwner, { onDelete: "NO ACTION", nullable: true })
@JoinColumn()
beneficial_owner: EformBeneficialOwner;
@Column({
nullable: true,
length: 256,
})
type: EformIdentityType;
@Column({
nullable: true,
length: 256,
})
number: string;
@Column({
nullable: true,
length: 256,
})
issued_at: string;
@Column({
nullable: true,
length: 256,
})
expired_at: string;
@Column({
nullable: true,
length: 4096,
})
file: String;
@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

@ -0,0 +1,60 @@
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
import { EformConfigOccupation } from "./eform_config_occupations";
import { EformConfigBusinessField } from "./eform_config_business_fields";
import { EformConfigSourceIncome } from "./eform_config_source_incomes";
import { EformBeneficialOwner } from "./eform_beneficial_owners";
@Entity("eform_beneficial_owner_jobs", { schema: "eforms" })
export class EformBeneficialOwnerJob {
@PrimaryGeneratedColumn("uuid")
id: string;
@ManyToOne(() => EformBeneficialOwner, { onDelete: "NO ACTION", nullable: true })
@JoinColumn()
beneficial_owner: EformBeneficialOwner;
@ManyToOne(() => EformConfigOccupation, { onDelete: "NO ACTION", nullable: true })
@JoinColumn()
occupation: EformConfigOccupation;
@ManyToOne(() => EformConfigSourceIncome, { onDelete: "NO ACTION", nullable: true })
@JoinColumn()
source_income: EformConfigSourceIncome;
@ManyToOne(() => EformConfigBusinessField, { onDelete: "NO ACTION", nullable: true })
@JoinColumn()
business_field: EformConfigBusinessField;
@Column({
nullable: true,
length: 256,
})
place: string;
@Column({
nullable: true,
length: 256,
})
position: string;
@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

@ -8,16 +8,25 @@ import { EformConfigBusinessField } from "./eform_config_business_fields";
import { EformConfigOccupation } from "./eform_config_occupations"; import { EformConfigOccupation } from "./eform_config_occupations";
import { EformConfigSourceIncome } from "./eform_config_source_incomes"; import { EformConfigSourceIncome } from "./eform_config_source_incomes";
import { EformConfigRelation } from "./eform_config_relations"; import { EformConfigRelation } from "./eform_config_relations";
import { EformConfigNationality } from "./eform_config_nationalities";
import { EformRequest } from "./eform_requests";
@Entity("eform_beneficial_owners", { schema: "eforms" }) @Entity("eform_beneficial_owners", { schema: "eforms" })
export class EformBeneficialOwner { 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;
@ManyToOne(() => EformConfigNationality, { onDelete: "NO ACTION", nullable: true })
@JoinColumn()
nationality: EformConfigNationality;
@ManyToOne(() => EformConfigSourceIncome, { onDelete: "NO ACTION", nullable: true }) @ManyToOne(() => EformConfigSourceIncome, { onDelete: "NO ACTION", nullable: true })
@JoinColumn() @JoinColumn()
source_income: EformConfigSourceIncome; source_income: EformConfigSourceIncome;

View File

@ -4,22 +4,27 @@ import { EformRegionAdministrativu } from "./eform_region_administrativus";
import { EformRegionSuco } from "./eform_region_sucos"; import { EformRegionSuco } from "./eform_region_sucos";
import { EformRegionAldeia } from "./eform_region_aldeias"; import { EformRegionAldeia } from "./eform_region_aldeias";
import { EformConfigRelation } from "./eform_config_relations"; import { EformConfigRelation } from "./eform_config_relations";
import { EformRequest } from "./eform_requests";
@Entity("eform_emergency_contacts", { schema: "eforms" }) @Entity("eform_emergency_contacts", { schema: "eforms" })
export class EformEmergencyContact { 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 })
@JoinColumn()
relation: EformConfigRelation;
@Column({ @Column({
nullable: false, nullable: false,
length: 4096, length: 4096,
}) })
name: string; name: string;
@ManyToOne(() => EformConfigRelation, { onDelete: "NO ACTION", nullable: true })
@JoinColumn()
relation: EformConfigRelation;
@Column({ @Column({
nullable: true, nullable: true,
length: 4096, length: 4096,

View File

@ -2,12 +2,17 @@ import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToM
import { EformInterestAccountType } from "../types/eform"; import { EformInterestAccountType } from "../types/eform";
import { EformConfigSourceIncome } from "./eform_config_source_incomes"; import { EformConfigSourceIncome } from "./eform_config_source_incomes";
import { EformFinancialBank } from "./eform_financial_banks"; import { EformFinancialBank } from "./eform_financial_banks";
import { EformRequest } from "./eform_requests";
@Entity("eform_financials", { schema: "eforms" }) @Entity("eform_financials", { schema: "eforms" })
export class EformFinancial { 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;

View File

@ -5,12 +5,17 @@ import { EformRegionSuco } from "./eform_region_sucos";
import { EformRegionAldeia } from "./eform_region_aldeias"; import { EformRegionAldeia } from "./eform_region_aldeias";
import { EformConfigOccupation } from "./eform_config_occupations"; import { EformConfigOccupation } from "./eform_config_occupations";
import { EformConfigBusinessField } from "./eform_config_business_fields"; import { EformConfigBusinessField } from "./eform_config_business_fields";
import { EformRequest } from "./eform_requests";
@Entity("eform_jobs", { schema: "eforms" }) @Entity("eform_jobs", { schema: "eforms" })
export class EformJob { 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;

View File

@ -29,6 +29,12 @@ export class EformPersonalIdentity {
}) })
expired_at: string; expired_at: string;
@Column({
nullable: true,
length: 256,
})
issued_at: string;
@Column({ @Column({
nullable: true, nullable: true,
length: 4096, length: 4096,

View File

@ -4,12 +4,17 @@ 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";
@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;
@ -18,16 +23,18 @@ export class EformPersonal {
@JoinColumn() @JoinColumn()
education: EformConfigEducation; education: EformConfigEducation;
@ManyToOne(() => EformConfigMarital, { onDelete: "NO ACTION", nullable: true })
@JoinColumn()
marital: EformConfigMarital;
@Column({ @Column({
nullable: false, nullable: false,
length: 4096, length: 4096,
}) })
name: string; name: string;
@Column({
nullable: false,
length: 4096,
})
marital: string;
@Column({ @Column({
nullable: true, nullable: true,
length: 128, length: 128,
@ -87,6 +94,18 @@ export class EformPersonal {
}) })
birth_date: Date; birth_date: Date;
@Column({
nullable: false,
length: 4096,
})
birth_mother: string;
@Column({
nullable: false,
length: 4096,
})
faximilie: string;
@ManyToMany(() => EformPersonalIdentity, (identity) => identity.personal) @ManyToMany(() => EformPersonalIdentity, (identity) => identity.personal)
personal_identities: EformPersonalIdentity[]; personal_identities: EformPersonalIdentity[];

View File

@ -24,6 +24,7 @@ export * from "../entity/eform_cifs";
export * from "../entity/eform_requests"; export * from "../entity/eform_requests";
export * from "../entity/eform_cifs"; export * from "../entity/eform_cifs";
export * from "../entity/eform_personals"; export * from "../entity/eform_personals";
export * from "../entity/eform_personal_identities";
export * from "../entity/eform_personal_main_addresses"; export * from "../entity/eform_personal_main_addresses";
export * from "../entity/eform_personal_domicile_addresses"; export * from "../entity/eform_personal_domicile_addresses";
export * from "../entity/eform_jobs"; export * from "../entity/eform_jobs";
@ -31,4 +32,5 @@ export * from "../entity/eform_financials";
export * from "../entity/eform_financial_banks"; export * from "../entity/eform_financial_banks";
export * from "../entity/eform_emergency_contacts"; export * from "../entity/eform_emergency_contacts";
export * from "../entity/eform_beneficial_owners"; export * from "../entity/eform_beneficial_owners";
export * from "../entity/eform_personal_identities"; export * from "../entity/eform_beneficial_owner_identities";
export * from "../entity/eform_beneficial_owner_jobs";

View File

@ -32,7 +32,7 @@ export enum EformRequestRequestorType {
} }
export enum EformGender { export enum EformGender {
"man" = "man", "male" = "male",
"female" = "female", "female" = "female",
} }