From a1c20fd050f92b7b474eeb4d05f48b0591ebb91c Mon Sep 17 00:00:00 2001 From: fro1991 Date: Mon, 20 Oct 2025 23:03:10 +0700 Subject: [PATCH] update --- src/entity/trx_authenticators.ts | 40 ----- src/entity/trx_cifs.ts | 46 ------ src/entity/trx_companies.ts | 81 ---------- src/entity/trx_company_accounts.ts | 50 ------ src/entity/trx_company_user_activity.ts | 63 -------- src/entity/trx_company_user_refresh_token.ts | 64 -------- src/entity/trx_company_users.ts | 85 ---------- src/entity/trx_config_banks.ts | 79 --------- src/entity/trx_config_booms.ts | 50 ------ src/entity/trx_config_business_entities.ts | 50 ------ src/entity/trx_config_business_fields.ts | 50 ------ src/entity/trx_config_channels.ts | 50 ------ src/entity/trx_config_educations.ts | 50 ------ src/entity/trx_config_identity_types.ts | 50 ------ src/entity/trx_config_language.ts | 63 -------- src/entity/trx_config_levels.ts | 45 ------ src/entity/trx_config_munisipos.ts | 44 ----- src/entity/trx_config_nationalities.ts | 57 ------- src/entity/trx_config_occupations.ts | 50 ------ src/entity/trx_config_products.ts | 50 ------ src/entity/trx_config_purposes.ts | 50 ------ src/entity/trx_config_rate.ts | 54 ------- src/entity/trx_config_relations.ts | 50 ------ src/entity/trx_config_religions.ts | 50 ------ src/entity/trx_config_source_incomes.ts | 50 ------ src/entity/trx_config_strs.ts | 50 ------ src/entity/trx_languages.ts | 63 -------- src/entity/trx_otp_email.ts | 58 ------- src/entity/trx_otp_number.ts | 57 ------- src/entity/trx_partner_accounts.ts | 49 ------ src/entity/trx_partner_user_activities.ts | 63 -------- src/entity/trx_partner_user_refresh_tokens.ts | 64 -------- src/entity/trx_partner_users.ts | 90 ----------- src/entity/trx_partners.ts | 88 ---------- src/entity/trx_recepients.ts | 85 ---------- src/entity/trx_region_administrativus.ts | 39 ----- src/entity/trx_region_aldeias.ts | 39 ----- src/entity/trx_region_munisipos.ts | 35 ---- src/entity/trx_region_sucos.ts | 40 ----- src/entity/trx_registration.ts | 58 ------- src/entity/trx_senders.ts | 78 --------- src/entity/trx_swifts.ts | 50 ------ src/entity/trx_transaction_amounts.ts | 71 --------- src/entity/trx_transactions.ts | 150 ------------------ src/schema/trx.ts | 45 ------ 45 files changed, 2643 deletions(-) delete mode 100644 src/entity/trx_authenticators.ts delete mode 100644 src/entity/trx_cifs.ts delete mode 100644 src/entity/trx_companies.ts delete mode 100644 src/entity/trx_company_accounts.ts delete mode 100644 src/entity/trx_company_user_activity.ts delete mode 100644 src/entity/trx_company_user_refresh_token.ts delete mode 100644 src/entity/trx_company_users.ts delete mode 100644 src/entity/trx_config_banks.ts delete mode 100644 src/entity/trx_config_booms.ts delete mode 100644 src/entity/trx_config_business_entities.ts delete mode 100644 src/entity/trx_config_business_fields.ts delete mode 100644 src/entity/trx_config_channels.ts delete mode 100644 src/entity/trx_config_educations.ts delete mode 100644 src/entity/trx_config_identity_types.ts delete mode 100644 src/entity/trx_config_language.ts delete mode 100644 src/entity/trx_config_levels.ts delete mode 100644 src/entity/trx_config_munisipos.ts delete mode 100644 src/entity/trx_config_nationalities.ts delete mode 100644 src/entity/trx_config_occupations.ts delete mode 100644 src/entity/trx_config_products.ts delete mode 100644 src/entity/trx_config_purposes.ts delete mode 100644 src/entity/trx_config_rate.ts delete mode 100644 src/entity/trx_config_relations.ts delete mode 100644 src/entity/trx_config_religions.ts delete mode 100644 src/entity/trx_config_source_incomes.ts delete mode 100644 src/entity/trx_config_strs.ts delete mode 100644 src/entity/trx_languages.ts delete mode 100644 src/entity/trx_otp_email.ts delete mode 100644 src/entity/trx_otp_number.ts delete mode 100644 src/entity/trx_partner_accounts.ts delete mode 100644 src/entity/trx_partner_user_activities.ts delete mode 100644 src/entity/trx_partner_user_refresh_tokens.ts delete mode 100644 src/entity/trx_partner_users.ts delete mode 100644 src/entity/trx_partners.ts delete mode 100644 src/entity/trx_recepients.ts delete mode 100644 src/entity/trx_region_administrativus.ts delete mode 100644 src/entity/trx_region_aldeias.ts delete mode 100644 src/entity/trx_region_munisipos.ts delete mode 100644 src/entity/trx_region_sucos.ts delete mode 100644 src/entity/trx_registration.ts delete mode 100644 src/entity/trx_senders.ts delete mode 100644 src/entity/trx_swifts.ts delete mode 100644 src/entity/trx_transaction_amounts.ts delete mode 100644 src/entity/trx_transactions.ts diff --git a/src/entity/trx_authenticators.ts b/src/entity/trx_authenticators.ts deleted file mode 100644 index add0a04..0000000 --- a/src/entity/trx_authenticators.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from "typeorm"; - -import { Status } from "../types/status"; - -@Entity("trx_authenticators", { schema: "trx" }) -export class TrxAuthenticator { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: false, - unique: true, - length: 256, - }) - authenticator: string; - - @Column({ nullable: false }) - generated_at: Date; - - @Column({ type: "boolean", nullable: true }) - is_valid: boolean; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; -} diff --git a/src/entity/trx_cifs.ts b/src/entity/trx_cifs.ts deleted file mode 100644 index 36ed442..0000000 --- a/src/entity/trx_cifs.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxCompanyUser } from "./trx_company_users"; -@Entity("trx_cifs", { schema: "trx" }) -export class TrxCif { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - number: string; - - @Column({ - nullable: false, - }) - generated_at: Date; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @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; -} diff --git a/src/entity/trx_companies.ts b/src/entity/trx_companies.ts deleted file mode 100644 index 1cf8d88..0000000 --- a/src/entity/trx_companies.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, OneToMany } from "typeorm"; -import { Status } from "../types/status"; -import { TrxCompanyAccount } from "./trx_company_accounts"; -import { TrxCompanyUser } from "./trx_company_users"; - -@Entity("trx_companies", { schema: "trx" }) -export class TrxCompany { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: false, - unique: true, - length: 256, - }) - name: string; - - @Column({ - nullable: false, - unique: true, - length: 256, - }) - code: string; - - @Column({ - nullable: false, - default: null, - length: 256, - }) - type: string; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @Column({ - nullable: false, - length: 256, - }) - pic_name: string; - - @Column({ - nullable: false, - unique: true, - length: 256, - }) - pic_phone: string; - - @Column({ - nullable: false, - unique: false, - length: 256, - }) - pic_email: string; - - @OneToMany(() => TrxCompanyAccount, (company_account) => company_account.company, { cascade: true, nullable: false }) - company_account: TrxCompanyAccount[]; - - @OneToMany(() => TrxCompanyUser, (company_user) => company_user.company, { cascade: true, nullable: false }) - company_user: TrxCompanyUser[]; - - @Column({ - nullable: true, - length: 4096, - }) - address: string; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; -} diff --git a/src/entity/trx_company_accounts.ts b/src/entity/trx_company_accounts.ts deleted file mode 100644 index e06f5b9..0000000 --- a/src/entity/trx_company_accounts.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from "typeorm"; - -import { Status } from "../types/status"; -import { TrxCompany } from "./trx_companies"; -import { TrxCif } from "./trx_cifs"; - -@Entity("trx_company_accounts", { schema: "trx" }) -export class TrxCompanyAccount { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ - nullable: false, - length: 256, - }) - account_number: string; - - @ManyToOne(() => TrxCompany, (company) => company.company_account, { onDelete: "NO ACTION" }) - @JoinColumn() - company: TrxCompany; - - @ManyToOne(() => TrxCif, { onDelete: "NO ACTION", nullable: true }) - @JoinTable() - cif: TrxCif; - - @Column({ - nullable: false, - default: "Y", - length: 64, - }) - status: Status; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; -} diff --git a/src/entity/trx_company_user_activity.ts b/src/entity/trx_company_user_activity.ts deleted file mode 100644 index f949f43..0000000 --- a/src/entity/trx_company_user_activity.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; - -import { ActivityType } from "../types/action"; -import { TrxCompanyUser } from "./trx_company_users"; - -@Entity("trx_company_user_activities") -export class TrxCompanyUserActivity { - @PrimaryGeneratedColumn("uuid") - id: string; - - @ManyToOne(() => TrxCompanyUser, { onDelete: "NO ACTION", nullable: false }) - @JoinColumn() - user: TrxCompanyUser; - - @Index() - @Column({ - type: "uuid", - }) - refresh_token: string; - - @Index() - @Column({ - nullable: false, - length: 512, - }) - module: string; - - @Column({ - nullable: false, - length: 2048, - }) - description: string; - - @Column({ - nullable: true, - length: 1, - }) - action: ActivityType; - - @Column({ - nullable: false, - length: 2048, - }) - url: String; - - @Column({ - type: "text", - nullable: true, - }) - data_body: String; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; -} diff --git a/src/entity/trx_company_user_refresh_token.ts b/src/entity/trx_company_user_refresh_token.ts deleted file mode 100644 index bbc69ba..0000000 --- a/src/entity/trx_company_user_refresh_token.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index } from "typeorm"; - -@Entity("trx_company_user_refresh_tokens", { schema: "trx" }) -export class TrxCompanyUserRefreshToken { - @PrimaryGeneratedColumn("uuid") - refresh_token: string; - - @Index() - @Column({ - type: "uuid", - }) - id_user: string; - - @Column({ - nullable: false, - length: 4096, - }) - user_agent: string; - - @Column({ - nullable: true, - length: 128, - }) - os: string; - - @Column({ - nullable: true, - length: 256, - }) - device: string; - - @Column({ - nullable: true, - length: 64, - }) - platform: string; - - @Column({ - nullable: true, - length: 64, - }) - browser: string; - - @Column({ - nullable: true, - length: 32, - }) - remote_addr: string; - - @Column("timestamp") - expired_at: Date; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; -} diff --git a/src/entity/trx_company_users.ts b/src/entity/trx_company_users.ts deleted file mode 100644 index 7b2ac5c..0000000 --- a/src/entity/trx_company_users.ts +++ /dev/null @@ -1,85 +0,0 @@ -import bcrypt from "bcryptjs"; -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToOne, JoinColumn, ManyToOne, OneToMany, ManyToMany, JoinTable } from "typeorm"; - -import { Status } from "../types/status"; -import { TrxCompany } from "./trx_companies"; -import { TrxConfigLevel } from "./trx_config_levels"; - -@Entity("trx_company_users", { schema: "trx" }) -export class TrxCompanyUser { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: false, - unique: true, - length: 64, - }) - email: string; - - @Column({ - nullable: false, - unique: true, - length: 256, - }) - phone: string; - - @Column({ - nullable: false, - length: 64, - select: false, - }) - password: string; - - @Column({ - nullable: false, - unique: true, - length: 64, - }) - username: string; - - @Column({ - nullable: true, - length: 64, - unique: false, - }) - name: string; - - @ManyToOne(() => TrxCompany, { onDelete: "NO ACTION" }) - @JoinTable() - company: TrxCompany; - - @Index() - @Column({ - nullable: true, - type: "uuid", - select: false, - }) - reset_token: string; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; - - hashPassword() { - this.password = bcrypt.hashSync(this.password, 8); - } - - checkIfPasswordMatch(unencryptedPassword: string) { - return bcrypt.compareSync(unencryptedPassword, this.password); - } -} diff --git a/src/entity/trx_config_banks.ts b/src/entity/trx_config_banks.ts deleted file mode 100644 index 7d02a05..0000000 --- a/src/entity/trx_config_banks.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm"; -import { Status } from "../types/status"; -import { TrxConfigBankType } from "../types/trx"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_banks", { schema: "trx" }) -export class TrxConfigBank { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - unique: true, - length: 256, - }) - code: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @Column({ - nullable: false, - default: "indonesia", - length: 256, - }) - type: TrxConfigBankType; - - @Column({ - nullable: true, - length: 256, - }) - fullname: string; - - @Column({ - nullable: true, - length: 256, - }) - formerly: string; - - @Column({ - nullable: true, - length: 4096, - }) - logo: string; - - @Column({ - nullable: true, - length: 64, - }) - status: Status; - - @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; -} diff --git a/src/entity/trx_config_booms.ts b/src/entity/trx_config_booms.ts deleted file mode 100644 index 7f2153e..0000000 --- a/src/entity/trx_config_booms.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_booms", { schema: "trx" }) -export class TrxConfigBoom { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_business_entities.ts b/src/entity/trx_config_business_entities.ts deleted file mode 100644 index 9e32315..0000000 --- a/src/entity/trx_config_business_entities.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_business_entities", { schema: "trx" }) -export class TrxConfigBusinessEntity { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_business_fields.ts b/src/entity/trx_config_business_fields.ts deleted file mode 100644 index 7e4f48e..0000000 --- a/src/entity/trx_config_business_fields.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_business_fields", { schema: "trx" }) -export class TrxConfigBusinessField { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_channels.ts b/src/entity/trx_config_channels.ts deleted file mode 100644 index 25aa9af..0000000 --- a/src/entity/trx_config_channels.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_channels", { schema: "trx" }) -export class TrxConfigChannel { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_educations.ts b/src/entity/trx_config_educations.ts deleted file mode 100644 index 71a4116..0000000 --- a/src/entity/trx_config_educations.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_educations", { schema: "trx" }) -export class TrxConfigEducation { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_identity_types.ts b/src/entity/trx_config_identity_types.ts deleted file mode 100644 index db768f5..0000000 --- a/src/entity/trx_config_identity_types.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_identity_types", { schema: "trx" }) -export class TrxConfigIdentityType { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_language.ts b/src/entity/trx_config_language.ts deleted file mode 100644 index 1cef0cb..0000000 --- a/src/entity/trx_config_language.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; - -import { Status } from "../types/status"; - -@Entity("trx_config_languages", { schema: "trx" }) -export class TrxConfigLanguage { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: false, - length: 128, - }) - code: string; - - @Column({ - nullable: false, - length: 4096, - default: "", - }) - eng: string; - - @Column({ - nullable: false, - length: 4096, - default: "", - }) - tet: string; - - @Column({ - nullable: false, - length: 4096, - default: "", - }) - ind: string; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ type: "varchar", length: 255 }) - created_by: string; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ type: "varchar", length: 255, nullable: true }) - updated_by: string; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; - - @Column({ type: "varchar", length: 255, nullable: true }) - deleted_by: string; -} diff --git a/src/entity/trx_config_levels.ts b/src/entity/trx_config_levels.ts deleted file mode 100644 index 52a259d..0000000 --- a/src/entity/trx_config_levels.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxPartnerUser } from "./trx_partner_users"; - -@Entity("trx_config_levels", { schema: "trx" }) -export class TrxConfigLevel { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @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; -} diff --git a/src/entity/trx_config_munisipos.ts b/src/entity/trx_config_munisipos.ts deleted file mode 100644 index 7e4158f..0000000 --- a/src/entity/trx_config_munisipos.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; - -import { Status } from "../types/status"; -import { TrxRegionMunisipo } from "./trx_region_munisipos"; - -@Entity("trx_config_munisipos", { schema: "trx" }) -export class TrxConfigMunisipo { - @PrimaryGeneratedColumn("uuid") - id: string; - - @ManyToOne(() => TrxRegionMunisipo, { onDelete: "RESTRICT" }) - @JoinColumn() - munisipo: TrxRegionMunisipo; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @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; -} diff --git a/src/entity/trx_config_nationalities.ts b/src/entity/trx_config_nationalities.ts deleted file mode 100644 index 50fa1eb..0000000 --- a/src/entity/trx_config_nationalities.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; - -@Entity("trx_config_nationalities", { schema: "trx" }) -export class TrxConfigNationality { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: true, - length: 256, - }) - code_number: string; - - @Column({ - nullable: true, - length: 256, - }) - flag: string; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @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; -} diff --git a/src/entity/trx_config_occupations.ts b/src/entity/trx_config_occupations.ts deleted file mode 100644 index fc1f3b8..0000000 --- a/src/entity/trx_config_occupations.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_occupations", { schema: "trx" }) -export class TrxConfigOccupation { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_products.ts b/src/entity/trx_config_products.ts deleted file mode 100644 index ea3ab87..0000000 --- a/src/entity/trx_config_products.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_products", { schema: "trx" }) -export class TrxConfigProduct { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_purposes.ts b/src/entity/trx_config_purposes.ts deleted file mode 100644 index e30b4ce..0000000 --- a/src/entity/trx_config_purposes.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_purposes", { schema: "trx" }) -export class TrxConfigPurpose { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_rate.ts b/src/entity/trx_config_rate.ts deleted file mode 100644 index 83d4902..0000000 --- a/src/entity/trx_config_rate.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; - -import { Status } from "../types/status"; - -@Entity("trx_config_rates", { schema: "trx" }) -export class TrxConfigRate { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - from: string; - - @Column({ - nullable: true, - length: 256, - }) - to: string; - - @Column({ - nullable: false, - type: "float8", - }) - value: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @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; -} diff --git a/src/entity/trx_config_relations.ts b/src/entity/trx_config_relations.ts deleted file mode 100644 index b981ef8..0000000 --- a/src/entity/trx_config_relations.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_relations", { schema: "trx" }) -export class TrxConfigRelation { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_religions.ts b/src/entity/trx_config_religions.ts deleted file mode 100644 index 5316f3a..0000000 --- a/src/entity/trx_config_religions.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_religions", { schema: "trx" }) -export class TrxConfigReligion { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_source_incomes.ts b/src/entity/trx_config_source_incomes.ts deleted file mode 100644 index cc21af7..0000000 --- a/src/entity/trx_config_source_incomes.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_source_incomes", { schema: "trx" }) -export class TrxConfigSourceIncome { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_config_strs.ts b/src/entity/trx_config_strs.ts deleted file mode 100644 index 441e553..0000000 --- a/src/entity/trx_config_strs.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; -import { Status } from "../types/status"; -import { TrxLanguage } from "./trx_languages"; -import { TrxConfigLanguage } from "./trx_config_language"; - -@Entity("trx_config_strs", { schema: "trx" }) -export class TrxConfigStr { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ type: "smallint", default: 0 }) - level: Number; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - language: TrxConfigLanguage; - - @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; -} diff --git a/src/entity/trx_languages.ts b/src/entity/trx_languages.ts deleted file mode 100644 index ebe3570..0000000 --- a/src/entity/trx_languages.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; - -import { Status } from "../types/status"; - -@Entity("trx_languages", { schema: "trx" }) -export class TrxLanguage { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: false, - length: 128, - }) - code: string; - - @Column({ - nullable: false, - length: 4096, - default: "", - }) - eng: string; - - @Column({ - nullable: false, - length: 4096, - default: "", - }) - tet: string; - - @Column({ - nullable: false, - length: 4096, - default: "", - }) - ind: string; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ type: "varchar", length: 255 }) - created_by: string; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ type: "varchar", length: 255, nullable: true }) - updated_by: string; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; - - @Column({ type: "varchar", length: 255, nullable: true }) - deleted_by: string; -} diff --git a/src/entity/trx_otp_email.ts b/src/entity/trx_otp_email.ts deleted file mode 100644 index 38c18eb..0000000 --- a/src/entity/trx_otp_email.ts +++ /dev/null @@ -1,58 +0,0 @@ -import bcrypt from "bcryptjs"; -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm"; - -@Entity("trx_otp_emails", { schema: "trx" }) -export class TrxOtpEmail { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - unique: true, - length: 64, - }) - codeid: string; - - @Column({ - nullable: false, - length: 64, - }) - otp: string; - - @Column({ - nullable: false, - length: 64, - }) - email: string; - - @Column({ - nullable: false, - }) - expired: Date; - - @Column({ - nullable: false, - default: false, - }) - status: boolean; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; - - hashOtp() { - this.otp = bcrypt.hashSync(this.otp, 8); - } - - checkIfOtpMatch(unencryptedOtp: string) { - return bcrypt.compareSync(unencryptedOtp, this.otp); - } -} diff --git a/src/entity/trx_otp_number.ts b/src/entity/trx_otp_number.ts deleted file mode 100644 index ede1a6d..0000000 --- a/src/entity/trx_otp_number.ts +++ /dev/null @@ -1,57 +0,0 @@ -import bcrypt from "bcryptjs"; -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm"; - -@Entity("trx_otp_numbers", { schema: "trx" }) -export class TrxOtpNumber { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - unique: true, - length: 64, - }) - codeid: string; - - @Column({ - nullable: false, - length: 64, - }) - otp: string; - - @Column({ - nullable: false, - length: 64, - }) - number: string; - - @Column({ - nullable: false, - }) - expired: Date; - - @Column({ - default: false, - }) - status: boolean; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; - - hashOtp() { - this.otp = bcrypt.hashSync(this.otp, 8); - } - - checkIfOtpMatch(unencryptedOtp: string) { - return bcrypt.compareSync(unencryptedOtp, this.otp); - } -} diff --git a/src/entity/trx_partner_accounts.ts b/src/entity/trx_partner_accounts.ts deleted file mode 100644 index 508f452..0000000 --- a/src/entity/trx_partner_accounts.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from "typeorm"; - -import { Status } from "../types/status"; -import { TrxPartner } from "./trx_partners"; -import { TrxCif } from "./trx_cifs"; - -@Entity("trx_partner_accounts", { schema: "trx" }) -export class TrxPartnerAccount { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: string; - - @Column({ - nullable: false, - length: 256, - }) - account_number: string; - - @ManyToOne(() => TrxPartner, (partner) => partner.partner_account, { onDelete: "RESTRICT" }) - @JoinColumn() - partner: TrxPartner; - - @ManyToOne(() => TrxCif, { onDelete: "RESTRICT", nullable: true }) - @JoinTable() - cif: TrxCif; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; -} diff --git a/src/entity/trx_partner_user_activities.ts b/src/entity/trx_partner_user_activities.ts deleted file mode 100644 index b19c494..0000000 --- a/src/entity/trx_partner_user_activities.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm"; - -import { ActivityType } from "../types/action"; -import { TrxPartnerUser } from "./trx_partner_users"; - -@Entity("trx_partner_user_activities", { schema: "trx" }) -export class TrxPartnerUserActivity { - @PrimaryGeneratedColumn("uuid") - id: string; - - @ManyToOne(() => TrxPartnerUser, { onDelete: "NO ACTION", nullable: false }) - @JoinColumn() - user: TrxPartnerUser; - - @Index() - @Column({ - type: "uuid", - }) - refresh_token: string; - - @Index() - @Column({ - nullable: false, - length: 512, - }) - module: string; - - @Column({ - nullable: false, - length: 2048, - }) - description: string; - - @Column({ - nullable: true, - length: 1, - }) - action: ActivityType; - - @Column({ - nullable: false, - length: 2048, - }) - url: String; - - @Column({ - type: "text", - nullable: true, - }) - data_body: String; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; -} diff --git a/src/entity/trx_partner_user_refresh_tokens.ts b/src/entity/trx_partner_user_refresh_tokens.ts deleted file mode 100644 index ff6e98a..0000000 --- a/src/entity/trx_partner_user_refresh_tokens.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index } from "typeorm"; - -@Entity("trx_partner_user_refresh_tokens", { schema: "trx" }) -export class TrxPartnerUserRefreshToken { - @PrimaryGeneratedColumn("uuid") - refresh_token: string; - - @Index() - @Column({ - type: "uuid", - }) - id_user: string; - - @Column({ - nullable: false, - length: 4096, - }) - user_agent: string; - - @Column({ - nullable: true, - length: 128, - }) - os: string; - - @Column({ - nullable: true, - length: 256, - }) - device: string; - - @Column({ - nullable: true, - length: 64, - }) - platform: string; - - @Column({ - nullable: true, - length: 64, - }) - browser: string; - - @Column({ - nullable: true, - length: 32, - }) - remote_addr: string; - - @Column("timestamp") - expired_at: Date; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; -} diff --git a/src/entity/trx_partner_users.ts b/src/entity/trx_partner_users.ts deleted file mode 100644 index 129361a..0000000 --- a/src/entity/trx_partner_users.ts +++ /dev/null @@ -1,90 +0,0 @@ -import bcrypt from "bcryptjs"; -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, OneToMany, JoinTable } from "typeorm"; - -import { Status } from "../types/status"; -import { TrxPartner } from "./trx_partners"; - -@Entity("trx_partner_users", { schema: "trx" }) -export class TrxPartnerUser { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: false, - unique: true, - length: 64, - }) - email: string; - - @Column({ - nullable: false, - unique: true, - length: 256, - }) - phone: string; - - @Column({ - nullable: false, - length: 64, - select: false, - }) - password: string; - - @Column({ - nullable: false, - unique: true, - length: 64, - }) - username: string; - - @Column({ - nullable: false, - length: 64, - unique: false, - }) - name: string; - - @ManyToOne(() => TrxPartner, { onDelete: "RESTRICT" }) - @JoinTable() - partner: TrxPartner; - - @Column({ - type: "jsonb", - nullable: true, - }) - level: string[]; - - @Index() - @Column({ - nullable: true, - type: "uuid", - select: false, - }) - reset_token: string; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @Column() - @CreateDateColumn() - created_at: Date; - - @Column({ nullable: true }) - @UpdateDateColumn() - updated_at: Date; - - @Column({ nullable: true }) - @DeleteDateColumn() - deleted_at: Date; - - hashPassword() { - this.password = bcrypt.hashSync(this.password, 8); - } - - checkIfPasswordMatch(unencryptedPassword: string) { - return bcrypt.compareSync(unencryptedPassword, this.password); - } -} diff --git a/src/entity/trx_partners.ts b/src/entity/trx_partners.ts deleted file mode 100644 index 9685002..0000000 --- a/src/entity/trx_partners.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; -import { TrxCompany } from "./trx_companies"; -import { Status } from "../types/status"; -import { TrxCif } from "./trx_cifs"; -import { TrxPartnerType } from "../types/trx"; -import { TrxPartnerAccount } from "./trx_partner_accounts"; - -@Entity("trx_partners", { schema: "trx" }) -export class TrxPartner { - @PrimaryGeneratedColumn("uuid") - id: string; - - @OneToMany(() => TrxPartnerAccount, (partner_account) => partner_account.partner, { cascade: true, nullable: false }) - partner_account: TrxPartnerAccount[]; - - @Column({ - nullable: false, - length: 4096, - }) - type: TrxPartnerType; - - @Column({ - nullable: false, - unique: true, - length: 256, - }) - code: string; - - @Column({ - nullable: false, - unique: true, - length: 256, - }) - name: string; - - @Column({ - nullable: false, - length: 256, - }) - pic_name: string; - - @Column({ - nullable: false, - unique: true, - length: 256, - }) - pic_phone: string; - - @Column({ - nullable: false, - unique: false, - length: 256, - }) - pic_email: string; - - @Column({ - nullable: true, - length: 4096, - }) - address: string; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @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; -} diff --git a/src/entity/trx_recepients.ts b/src/entity/trx_recepients.ts deleted file mode 100644 index 176d3d4..0000000 --- a/src/entity/trx_recepients.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; -import { Status } from "../types/status"; -import { TrxConfigNationality } from "./trx_config_nationalities"; -import { TrxConfigBank } from "./trx_config_banks"; -import { TrxTransaction } from "./trx_transactions"; - -@Entity("trx_recepients", { schema: "trx" }) -export class TrxRecepient { - @PrimaryGeneratedColumn("uuid") - id: string; - - @OneToOne(() => TrxTransaction, (transaction) => transaction.recepient, { onDelete: "CASCADE" }) - transaction: TrxTransaction; - - @ManyToOne(() => TrxConfigBank, { onDelete: "NO ACTION", nullable: false }) - @JoinColumn() - bank: TrxConfigBank; - - @ManyToOne(() => TrxConfigNationality, { onDelete: "NO ACTION", nullable: true }) - @JoinColumn() - nationality: TrxConfigNationality; - - @Column({ - nullable: false, - length: 256, - }) - account_number: string; - - @Column({ - nullable: true, - length: 256, - }) - iban: string; - - @Column({ - nullable: false, - length: 256, - }) - name: string; - - @Column({ - nullable: false, - length: 256, - }) - phone: string; - - @Column({ - nullable: false, - length: 256, - }) - email: string; - - @Column({ - nullable: true, - length: 4096, - }) - address: string; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @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; -} diff --git a/src/entity/trx_region_administrativus.ts b/src/entity/trx_region_administrativus.ts deleted file mode 100644 index 343f7ea..0000000 --- a/src/entity/trx_region_administrativus.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; -import { TrxRegionMunisipo } from "./trx_region_munisipos"; - -@Entity("trx_region_administrativus", { schema: "trx" }) -export class TrxRegionAdministrativu { - @PrimaryGeneratedColumn("uuid") - id: string; - - @ManyToOne(() => TrxRegionMunisipo, { onDelete: "NO ACTION" }) - @JoinColumn() - munisipo: TrxRegionMunisipo; - - @Column({ - nullable: true, - length: 256, - }) - name: 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; -} diff --git a/src/entity/trx_region_aldeias.ts b/src/entity/trx_region_aldeias.ts deleted file mode 100644 index d248f5f..0000000 --- a/src/entity/trx_region_aldeias.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; -import { TrxRegionSuco } from "./trx_region_sucos"; - -@Entity("trx_region_aldeias", { schema: "trx" }) -export class TrxRegionAldeia { - @PrimaryGeneratedColumn("uuid") - id: string; - - @ManyToOne(() => TrxRegionSuco, { onDelete: "NO ACTION" }) - @JoinColumn() - suco: TrxRegionSuco; - - @Column({ - nullable: true, - length: 256, - }) - name: 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; -} diff --git a/src/entity/trx_region_munisipos.ts b/src/entity/trx_region_munisipos.ts deleted file mode 100644 index 69e60e4..0000000 --- a/src/entity/trx_region_munisipos.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm"; -import { Status } from "../types/status"; - -@Entity("trx_region_munisipos", { schema: "trx" }) -export class TrxRegionMunisipo { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - name: 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; -} diff --git a/src/entity/trx_region_sucos.ts b/src/entity/trx_region_sucos.ts deleted file mode 100644 index b9f2d9d..0000000 --- a/src/entity/trx_region_sucos.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm"; -import { Status } from "../types/status"; -import { TrxRegionAdministrativu } from "./trx_region_administrativus"; - -@Entity("trx_region_sucos", { schema: "trx" }) -export class TrxRegionSuco { - @PrimaryGeneratedColumn("uuid") - id: string; - - @ManyToOne(() => TrxRegionAdministrativu, { onDelete: "NO ACTION" }) - @JoinColumn() - administrativu: TrxRegionAdministrativu; - - @Column({ - nullable: true, - length: 256, - }) - name: 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; -} diff --git a/src/entity/trx_registration.ts b/src/entity/trx_registration.ts deleted file mode 100644 index d0cd403..0000000 --- a/src/entity/trx_registration.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; -import { TrxCompany } from "./trx_companies"; -import { Status } from "../types/status"; -import { TrxCif } from "./trx_cifs"; - -@Entity("trx_registrations", { schema: "trx" }) -export class TrxRegistration { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: false, - length: 256, - unique: true, - }) - code: string; - - @ManyToOne(() => TrxCompany, { onDelete: "NO ACTION", nullable: true }) - @JoinColumn() - company: TrxCompany; - - @ManyToOne(() => TrxCif, { onDelete: "NO ACTION", nullable: true }) - @JoinColumn() - cif: TrxCif; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @Column({ nullable: true }) - registration_at: Date; - - @Column({ nullable: true, length: 256 }) - registration_by: 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; -} diff --git a/src/entity/trx_senders.ts b/src/entity/trx_senders.ts deleted file mode 100644 index 1097b52..0000000 --- a/src/entity/trx_senders.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; -import { Status } from "../types/status"; -import { TrxConfigNationality } from "./trx_config_nationalities"; -import { TrxPartnerAccount } from "./trx_partner_accounts"; -import { TrxTransaction } from "./trx_transactions"; -import { TrxConfigBank } from "./trx_config_banks"; - -@Entity("trx_senders", { schema: "trx" }) -export class TrxSender { - @PrimaryGeneratedColumn("uuid") - id: string; - - @OneToOne(() => TrxTransaction, (transaction) => transaction.sender, { onDelete: "CASCADE" }) - transaction: TrxTransaction; - - @ManyToOne(() => TrxConfigNationality, { onDelete: "NO ACTION", nullable: true }) - @JoinColumn() - nationality: TrxConfigNationality; - - @ManyToOne(() => TrxPartnerAccount, { onDelete: "NO ACTION", nullable: true }) - @JoinColumn() - partner_account: TrxPartnerAccount; - - @ManyToOne(() => TrxConfigBank, { onDelete: "NO ACTION", nullable: false }) - @JoinColumn() - bank: TrxConfigBank; - - @Column({ - nullable: false, - length: 256, - }) - name: string; - - @Column({ - nullable: false, - length: 256, - }) - phone: string; - - @Column({ - nullable: false, - length: 256, - }) - email: string; - - @Column({ - nullable: true, - length: 4096, - }) - address: string; - - @Column({ - nullable: false, - length: 64, - }) - status: Status; - - @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; -} diff --git a/src/entity/trx_swifts.ts b/src/entity/trx_swifts.ts deleted file mode 100644 index 16bb3cf..0000000 --- a/src/entity/trx_swifts.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; -import { TrxTransaction } from "./trx_transactions"; - -@Entity("trx_swifts", { schema: "trx" }) -export class TrxSwift { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: true, - length: 256, - }) - invoice: string; - - @Column({ - nullable: true, - length: 256, - }) - bic: string; - - @Column({ - nullable: true, - length: 4096, - }) - file: string; - - @OneToOne(() => TrxTransaction, (transaction) => transaction.swift, { onDelete: "CASCADE" }) - transaction: TrxTransaction; - - @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; -} diff --git a/src/entity/trx_transaction_amounts.ts b/src/entity/trx_transaction_amounts.ts deleted file mode 100644 index 28d91b4..0000000 --- a/src/entity/trx_transaction_amounts.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; -import { TrxConfigSourceIncome } from "./trx_config_source_incomes"; -import { TrxTransaction } from "./trx_transactions"; -import { TrxTransactionTypeStatus, TrxTransactionCorrespondentFees, TrxTransactionStatus } from "../types/trx"; - -@Entity("trx_transaction_amounts", { schema: "trx" }) -export class TrxTransactionAmount { - @PrimaryGeneratedColumn("uuid") - id: string; - - @Column({ - nullable: false, - length: 256, - }) - type_transaction: TrxTransactionTypeStatus; - - @Column({ - nullable: true, - length: 256, - }) - correspondent_fees: string; - - @Column({ type: "float8" }) - amount_overbooking: number; - - @Column({ type: "float8", nullable: true }) - transfer_amount: number; - - @Column({ type: "float8", nullable: true }) - transfer_total: number; - - @Column({ type: "float8", nullable: true }) - commission: number; - - @Column({ type: "float8", nullable: true }) - cost_of_sender: number; - - @Column({ type: "float8", nullable: true }) - sub_total: number; - - @Column({ type: "float8", nullable: false, default: 0 }) - rate: number; - - @OneToOne(() => TrxTransaction, (transaction) => transaction.transaction_amount, { onDelete: "CASCADE" }) - transaction: TrxTransaction; - - @ManyToOne(() => TrxConfigSourceIncome, { onDelete: "NO ACTION", nullable: true }) - @JoinColumn() - source_income: TrxConfigSourceIncome; - - @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; -} diff --git a/src/entity/trx_transactions.ts b/src/entity/trx_transactions.ts deleted file mode 100644 index c0e342f..0000000 --- a/src/entity/trx_transactions.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; -import { TrxTransactionTransferStatus, TrxTransactionStatus } from "../types/trx"; -import { TrxPartner } from "./trx_partners"; -import { TrxAuthenticator } from "./trx_authenticators"; -import { TrxSender } from "./trx_senders"; -import { TrxRecepient } from "./trx_recepients"; -import { TrxSwift } from "./trx_swifts"; -import { TrxTransactionAmount } from "./trx_transaction_amounts"; - -@Entity("trx_transactions", { schema: "trx" }) -export class TrxTransaction { - @PrimaryGeneratedColumn("uuid") - id: string; - - @ManyToOne(() => TrxAuthenticator, { onDelete: "RESTRICT", nullable: true }) - @JoinColumn() - authenticator: TrxAuthenticator; - - @ManyToOne(() => TrxPartner, { onDelete: "RESTRICT", nullable: false }) - @JoinColumn() - partner: TrxPartner; - - @OneToOne(() => TrxSender, (sender) => sender.transaction, { cascade: true }) - @JoinColumn() - sender: TrxSender; - - @OneToOne(() => TrxRecepient, (recepient) => recepient.transaction, { cascade: true }) - @JoinColumn() - recepient: TrxRecepient; - - @OneToOne(() => TrxTransactionAmount, (transaction_amount) => transaction_amount.transaction, { cascade: true }) - @JoinColumn() - transaction_amount: TrxTransactionAmount; - - @OneToOne(() => TrxSwift, (swift) => swift.transaction, { cascade: true }) - @JoinColumn() - swift: TrxSwift; - - @Column({ - nullable: false, - length: 256, - unique: true, - }) - code: string; - - @Column({ - nullable: false, - length: 256, - }) - type_transfer: TrxTransactionTransferStatus; - - @Column({ - nullable: true, - default: null, - }) - is_maker_approved: boolean; - - @Column({ type: "varchar", length: 100, nullable: true }) - maker_approved_by: string; - - @Column({ type: "varchar", length: 4096, nullable: true }) - maker_note: string; - - @Column({ nullable: true }) - maker_approved_at: Date; - - @Column({ - nullable: true, - default: null, - }) - is_checker_approved: boolean; - - @Column({ type: "varchar", length: 100, nullable: true }) - checker_approved_by: string; - - @Column({ type: "varchar", length: 4096, nullable: true }) - checker_note: string; - - @Column({ nullable: true }) - checker_approved_at: Date; - - @Column({ - nullable: true, - default: null, - }) - is_signer_approved: boolean; - - @Column({ type: "varchar", length: 100, nullable: true }) - signer_approved_by: string; - - @Column({ type: "varchar", length: 4096, nullable: true }) - signer_note: string; - - @Column({ nullable: true }) - signer_approved_at: Date; - - @Column({ type: "boolean", nullable: true }) - is_release: boolean; - - @Column({ type: "varchar", length: 100, nullable: true }) - release_by: string; - - @Column({ type: "varchar", length: 4096, nullable: true }) - release_note: string; - - @Column({ nullable: true }) - release_at: Date; - - @Column({ - nullable: true, - length: 256, - }) - release_file: string; - - @Column({ type: "varchar", length: 4096, nullable: true }) - remark: string; - - @Column({ - nullable: false, - length: 64, - }) - status: TrxTransactionStatus; - - @Column({ nullable: true }) - transaction_at: Date; - - @Column({ nullable: true, length: 256 }) - transaction_by: 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; -} diff --git a/src/schema/trx.ts b/src/schema/trx.ts index 76a5a17..2b539f5 100644 --- a/src/schema/trx.ts +++ b/src/schema/trx.ts @@ -1,48 +1,3 @@ -export * from "../entity/trx_companies"; -export * from "../entity/trx_company_users"; -export * from "../entity/trx_company_user_activity"; -export * from "../entity/trx_company_user_refresh_token"; -export * from "../entity/trx_company_accounts"; -export * from "../entity/trx_otp_email"; -export * from "../entity/trx_otp_number"; -export * from "../entity/trx_cifs"; -export * from "../entity/trx_languages"; -export * from "../entity/trx_config_booms"; -export * from "../entity/trx_config_business_entities"; -export * from "../entity/trx_config_business_fields"; -export * from "../entity/trx_config_channels"; -export * from "../entity/trx_config_educations"; -export * from "../entity/trx_config_identity_types"; -export * from "../entity/trx_config_munisipos"; -export * from "../entity/trx_config_banks"; -export * from "../entity/trx_config_nationalities"; -export * from "../entity/trx_config_levels"; -export * from "../entity/trx_config_occupations"; -export * from "../entity/trx_config_products"; -export * from "../entity/trx_config_purposes"; -export * from "../entity/trx_config_language"; -export * from "../entity/trx_config_rate"; -export * from "../entity/trx_config_relations"; -export * from "../entity/trx_config_religions"; -export * from "../entity/trx_config_source_incomes"; -export * from "../entity/trx_config_strs"; -export * from "../entity/trx_region_munisipos"; -export * from "../entity/trx_region_administrativus"; -export * from "../entity/trx_region_aldeias"; -export * from "../entity/trx_region_sucos"; -export * from "../entity/trx_registration"; -export * from "../entity/trx_transactions"; -export * from "../entity/trx_transaction_amounts"; -export * from "../entity/trx_senders"; -export * from "../entity/trx_recepients"; -export * from "../entity/trx_swifts"; -export * from "../entity/trx_authenticators"; -export * from "../entity/trx_partners"; -export * from "../entity/trx_partner_accounts"; -export * from "../entity/trx_partner_user_activities"; -export * from "../entity/trx_partner_user_refresh_tokens"; -export * from "../entity/trx_partner_users"; - export * from "../entity/trx_verifications"; export * from "../entity/trx_customers"; export * from "../entity/trx_customer_accounts";