Merge branch 'main' of https://git.shiblysolution.id/BRITL/entity
This commit is contained in:
@ -66,19 +66,19 @@ export class RemitBeneficial {
|
|||||||
|
|
||||||
@ManyToOne(() => RemitMunisipo, { onDelete: "NO ACTION" })
|
@ManyToOne(() => RemitMunisipo, { onDelete: "NO ACTION" })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
munisipo: RemitMunisipo
|
munisipo: RemitMunisipo;
|
||||||
|
|
||||||
@ManyToOne(() => RemitAdministrativu, { onDelete: "NO ACTION" })
|
@ManyToOne(() => RemitAdministrativu, { onDelete: "NO ACTION" })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
administrativu: RemitAdministrativu
|
administrativu: RemitAdministrativu;
|
||||||
|
|
||||||
@ManyToOne(() => RemitSuco, { onDelete: "NO ACTION" })
|
@ManyToOne(() => RemitSuco, { onDelete: "NO ACTION" })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
suco: RemitSuco
|
suco: RemitSuco;
|
||||||
|
|
||||||
@ManyToOne(() => RemitAldeia, { onDelete: "NO ACTION" })
|
@ManyToOne(() => RemitAldeia, { onDelete: "NO ACTION" })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
aldeia: RemitAldeia
|
aldeia: RemitAldeia;
|
||||||
|
|
||||||
@ManyToOne(() => RemitConfigNationalities, { onDelete: "NO ACTION", nullable: true })
|
@ManyToOne(() => RemitConfigNationalities, { onDelete: "NO ACTION", nullable: true })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
@ -114,7 +114,7 @@ export class RemitBeneficial {
|
|||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256, })
|
@Column({ nullable: true, length: 256 })
|
||||||
created_by: string;
|
created_by: string;
|
||||||
|
|
||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
@ -130,4 +130,8 @@ export class RemitBeneficial {
|
|||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
@Column({ nullable: true, length: 256 })
|
||||||
deleted_by: string;
|
deleted_by: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitBeneficial, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
parent: RemitBeneficial;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,9 @@ import { RemitConfigSourceIncome } from "./remit_config_source_incomes";
|
|||||||
import { RemitConfigBank } from "./remit_config_banks";
|
import { RemitConfigBank } from "./remit_config_banks";
|
||||||
import { RemitIndoProvince } from "./remit_indo_provinces";
|
import { RemitIndoProvince } from "./remit_indo_provinces";
|
||||||
import { RemitIndoCity } from "./remit_indo_cities";
|
import { RemitIndoCity } from "./remit_indo_cities";
|
||||||
|
import { RemitConfigRelation } from "./remit_config_relations";
|
||||||
|
import { RemitConfigBusinessType } from "./remit_config_business_types";
|
||||||
|
import { RemitConfigBusinessField } from "./remit_config_business_fields";
|
||||||
|
|
||||||
@Entity("remit_beneficiaries", { schema: "remits" })
|
@Entity("remit_beneficiaries", { schema: "remits" })
|
||||||
export class RemitBeneficiary {
|
export class RemitBeneficiary {
|
||||||
@ -92,4 +95,28 @@ export class RemitBeneficiary {
|
|||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
@Column({ nullable: true, length: 256 })
|
||||||
deleted_by: string;
|
deleted_by: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitBeneficiary, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
parent: RemitBeneficiary;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitConfigRelation, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
relation: RemitConfigRelation;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitConfigOccupation, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
occupation: RemitConfigOccupation;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitConfigBusinessType, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
business_type: RemitConfigBusinessType;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitConfigBusinessField, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
business_field: RemitConfigBusinessField;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitConfigNationalities, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
nationality: RemitConfigNationalities;
|
||||||
}
|
}
|
||||||
|
|||||||
45
src/entity/remit_config_transaction_channels.ts
Normal file
45
src/entity/remit_config_transaction_channels.ts
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
|
|
||||||
|
import { Status } from "../types/status";
|
||||||
|
|
||||||
|
@Entity("remit_config_transaction_channels", { schema: "remits" })
|
||||||
|
export class RemitConfigTransactionChannel {
|
||||||
|
@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;
|
||||||
|
}
|
||||||
@ -15,6 +15,8 @@ import { RemitAdministrativu } from "./remit_administrativus";
|
|||||||
import { RemitSuco } from "./remit_sucos";
|
import { RemitSuco } from "./remit_sucos";
|
||||||
import { RemitAldeia } from "./remit_aldeias";
|
import { RemitAldeia } from "./remit_aldeias";
|
||||||
import { RemitSenderIdentity } from "./remit_sender_identities";
|
import { RemitSenderIdentity } from "./remit_sender_identities";
|
||||||
|
import { RemitConfigBusinessType } from "./remit_config_business_types";
|
||||||
|
import { RemitConfigBusinessField } from "./remit_config_business_fields";
|
||||||
|
|
||||||
@Entity("remit_senders", { schema: "remits" })
|
@Entity("remit_senders", { schema: "remits" })
|
||||||
export class RemitSender {
|
export class RemitSender {
|
||||||
@ -135,4 +137,16 @@ export class RemitSender {
|
|||||||
|
|
||||||
@ManyToMany(() => RemitSenderIdentity, (identity) => identity.sender)
|
@ManyToMany(() => RemitSenderIdentity, (identity) => identity.sender)
|
||||||
sender_identities: RemitSenderIdentity[];
|
sender_identities: RemitSenderIdentity[];
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitSender, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
parent: RemitSender;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitConfigBusinessType, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
business_type: RemitConfigBusinessType;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitConfigBusinessField, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
business_field: RemitConfigBusinessField;
|
||||||
}
|
}
|
||||||
|
|||||||
69
src/entity/remit_transaction_risk.ts
Normal file
69
src/entity/remit_transaction_risk.ts
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinTable } from "typeorm";
|
||||||
|
import { RemitTransaction } from "./remit_transactions";
|
||||||
|
|
||||||
|
@Entity("remit_transaction_risk", { schema: "remits" })
|
||||||
|
export class RemitTransactionRisk {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitTransaction, { onDelete: "RESTRICT" })
|
||||||
|
@JoinTable()
|
||||||
|
transaction: RemitTransaction;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
category: String;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
name: String;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
ref_table: String;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
ref_id: String;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
ref_name: String;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
type: "int2",
|
||||||
|
})
|
||||||
|
ref_value: Number;
|
||||||
|
|
||||||
|
@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;
|
||||||
|
}
|
||||||
@ -1,14 +1,14 @@
|
|||||||
import bcrypt from "bcryptjs";
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToOne, JoinColumn, ManyToOne, OneToMany, ManyToMany, JoinTable } from "typeorm";
|
|
||||||
import { RemitPartner } from "./remit_partners";
|
|
||||||
import { ApprovalStatus } from "../enum/approvalStatus";
|
|
||||||
import { RemitSender } from "./remit_senders";
|
|
||||||
import { RemitBeneficiary } from "./remit_beneficiaries";
|
|
||||||
import { RemitConfigPurpose } from "./remit_config_purposes";
|
|
||||||
import { RemitTransactionCurrencyType, RemitTransactionStatus } from "../types/remit";
|
import { RemitTransactionCurrencyType, RemitTransactionStatus } from "../types/remit";
|
||||||
import { RemitBeneficial } from "./remit_beneficials";
|
import { RemitBeneficial } from "./remit_beneficials";
|
||||||
|
import { RemitBeneficiary } from "./remit_beneficiaries";
|
||||||
|
import { RemitConfigPurpose } from "./remit_config_purposes";
|
||||||
import { RemitConfigRate } from "./remit_config_rates";
|
import { RemitConfigRate } from "./remit_config_rates";
|
||||||
|
import { RemitMunisipo } from "./remit_munisipos";
|
||||||
|
import { RemitPartner } from "./remit_partners";
|
||||||
|
import { RemitSender } from "./remit_senders";
|
||||||
|
import { RemitConfigTransactionType } from "./remit_config_transaction_types";
|
||||||
|
import { RemitConfigTransactionChannel } from "./remit_config_transaction_channels";
|
||||||
|
|
||||||
@Entity("remit_transactions", { schema: "remits" })
|
@Entity("remit_transactions", { schema: "remits" })
|
||||||
export class RemitTransaction {
|
export class RemitTransaction {
|
||||||
@ -29,11 +29,11 @@ export class RemitTransaction {
|
|||||||
})
|
})
|
||||||
reference: string;
|
reference: string;
|
||||||
|
|
||||||
@ManyToOne(() => RemitPartner, { onDelete: "RESTRICT" })
|
@ManyToOne(() => RemitPartner, { onDelete: "NO ACTION" })
|
||||||
@JoinTable()
|
@JoinTable()
|
||||||
partner: RemitPartner;
|
partner: RemitPartner;
|
||||||
|
|
||||||
@ManyToOne(() => RemitSender, { onDelete: "RESTRICT" })
|
@ManyToOne(() => RemitSender, { onDelete: "NO ACTION" })
|
||||||
@JoinTable()
|
@JoinTable()
|
||||||
sender: RemitSender;
|
sender: RemitSender;
|
||||||
|
|
||||||
@ -41,14 +41,18 @@ export class RemitTransaction {
|
|||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
benefecial: RemitBeneficial;
|
benefecial: RemitBeneficial;
|
||||||
|
|
||||||
@ManyToOne(() => RemitBeneficiary, { onDelete: "RESTRICT" })
|
@ManyToOne(() => RemitBeneficiary, { onDelete: "NO ACTION" })
|
||||||
@JoinTable()
|
@JoinTable()
|
||||||
beneficiary: RemitBeneficiary;
|
beneficiary: RemitBeneficiary;
|
||||||
|
|
||||||
@ManyToOne(() => RemitConfigPurpose, { onDelete: "RESTRICT" })
|
@ManyToOne(() => RemitConfigPurpose, { onDelete: "NO ACTION" })
|
||||||
@JoinTable()
|
@JoinTable()
|
||||||
purpose: RemitConfigPurpose;
|
purpose: RemitConfigPurpose;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitMunisipo, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinTable()
|
||||||
|
munisipo: RemitMunisipo;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 5,
|
length: 5,
|
||||||
@ -61,7 +65,7 @@ export class RemitTransaction {
|
|||||||
})
|
})
|
||||||
amount: Number;
|
amount: Number;
|
||||||
|
|
||||||
@ManyToOne(() => RemitConfigRate, { onDelete: "RESTRICT", nullable: true })
|
@ManyToOne(() => RemitConfigRate, { onDelete: "NO ACTION", nullable: true })
|
||||||
@JoinTable()
|
@JoinTable()
|
||||||
rate: RemitConfigRate;
|
rate: RemitConfigRate;
|
||||||
|
|
||||||
@ -119,6 +123,12 @@ export class RemitTransaction {
|
|||||||
})
|
})
|
||||||
callback_count: Number;
|
callback_count: Number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: "float8",
|
||||||
|
})
|
||||||
|
risk_score: Number;
|
||||||
|
|
||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
callback_at: Date;
|
callback_at: Date;
|
||||||
|
|
||||||
@ -142,4 +152,12 @@ export class RemitTransaction {
|
|||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
@Column({ nullable: true, length: 256 })
|
||||||
deleted_by: string;
|
deleted_by: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitConfigTransactionType, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinTable()
|
||||||
|
transaction_type: RemitConfigTransactionType;
|
||||||
|
|
||||||
|
@ManyToOne(() => RemitConfigTransactionChannel, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinTable()
|
||||||
|
transaction_channel: RemitConfigTransactionChannel;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,10 +119,12 @@ import { RemitConfigTransactionType } from "./entity/remit_config_transaction_ty
|
|||||||
import { RemitConfigChannel } from "./entity/remit_config_channels";
|
import { RemitConfigChannel } from "./entity/remit_config_channels";
|
||||||
import { RemitConfigTransactionInfo } from "./entity/remit_config_transaction_infos";
|
import { RemitConfigTransactionInfo } from "./entity/remit_config_transaction_infos";
|
||||||
import { RemitConfigBoom } from "./entity/remit_config_booms";
|
import { RemitConfigBoom } from "./entity/remit_config_booms";
|
||||||
|
import { RemitConfigTransactionChannel } from "./entity/remit_config_transaction_channels";
|
||||||
import { RemitIndoProvince } from "./entity/remit_indo_provinces";
|
import { RemitIndoProvince } from "./entity/remit_indo_provinces";
|
||||||
import { RemitIndoCity } from "./entity/remit_indo_cities";
|
import { RemitIndoCity } from "./entity/remit_indo_cities";
|
||||||
import { RemitPartnerCallback } from "./entity/remit_partner_callbacks";
|
import { RemitPartnerCallback } from "./entity/remit_partner_callbacks";
|
||||||
import { RemitTransactionPartnerCallbackLog } from "./entity/remit_transaction_partner_callback_logs";
|
import { RemitTransactionPartnerCallbackLog } from "./entity/remit_transaction_partner_callback_logs";
|
||||||
|
import { RemitTransactionRisk } from "./entity/remit_transaction_risk";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
RemitPartnerType, //
|
RemitPartnerType, //
|
||||||
@ -411,6 +413,7 @@ export {
|
|||||||
RemitConfigChannel,
|
RemitConfigChannel,
|
||||||
RemitConfigTransactionInfo,
|
RemitConfigTransactionInfo,
|
||||||
RemitConfigBoom,
|
RemitConfigBoom,
|
||||||
|
RemitConfigTransactionChannel,
|
||||||
RemitPartnerAccounts,
|
RemitPartnerAccounts,
|
||||||
RemitPartnerApi,
|
RemitPartnerApi,
|
||||||
RemitPartnerDocument,
|
RemitPartnerDocument,
|
||||||
@ -422,6 +425,7 @@ export {
|
|||||||
RemitSender,
|
RemitSender,
|
||||||
RemitSenderIdentity,
|
RemitSenderIdentity,
|
||||||
RemitTransaction,
|
RemitTransaction,
|
||||||
|
RemitTransactionRisk,
|
||||||
RemitIndoProvince,
|
RemitIndoProvince,
|
||||||
RemitIndoCity,
|
RemitIndoCity,
|
||||||
RemitPartnerCallback,
|
RemitPartnerCallback,
|
||||||
|
|||||||
Reference in New Issue
Block a user