up
This commit is contained in:
@ -10,6 +10,8 @@ import { RemitConfigOccupation } from "./remit_config_occupations";
|
||||
import { RemitGender, RemitIdentityType, RemitSenderType } from "../types/remit";
|
||||
import { RemitConfigSourceIncome } from "./remit_config_source_incomes";
|
||||
import { RemitConfigBank } from "./remit_config_banks";
|
||||
import { RemitIndoProvince } from "./remit_indo_provinces";
|
||||
import { RemitIndoCity } from "./remit_indo_cities";
|
||||
|
||||
@Entity("remit_beneficiaries", { schema: "remits" })
|
||||
export class RemitBeneficiary {
|
||||
@ -44,6 +46,14 @@ export class RemitBeneficiary {
|
||||
})
|
||||
address: string;
|
||||
|
||||
@ManyToOne(() => RemitIndoProvince, { onDelete: "NO ACTION", nullable: true })
|
||||
@JoinColumn()
|
||||
province: RemitIndoProvince;
|
||||
|
||||
@ManyToOne(() => RemitIndoCity, { onDelete: "NO ACTION", nullable: true })
|
||||
@JoinColumn()
|
||||
city: RemitIndoCity;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
@ -66,7 +76,7 @@ export class RemitBeneficiary {
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256, })
|
||||
@Column({ nullable: true, length: 256 })
|
||||
created_by: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
|
||||
@ -8,6 +8,12 @@ export class RemitConfigNationalities {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 3,
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
|
||||
49
src/entity/remit_indo_cities.ts
Normal file
49
src/entity/remit_indo_cities.ts
Normal file
@ -0,0 +1,49 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { RemitMunisipo } from "./remit_munisipos";
|
||||
import { RemitAdministrativu } from "./remit_administrativus";
|
||||
import { RemitSuco } from "./remit_sucos";
|
||||
import { RemitIndoProvince } from "./remit_indo_provinces";
|
||||
|
||||
@Entity("remit_indo_cities", { schema: "remits" })
|
||||
export class RemitIndoCity {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@ManyToOne(() => RemitIndoProvince, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
province: RemitIndoProvince;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
})
|
||||
code: 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;
|
||||
}
|
||||
44
src/entity/remit_indo_provinces.ts
Normal file
44
src/entity/remit_indo_provinces.ts
Normal file
@ -0,0 +1,44 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { RemitMunisipo } from "./remit_munisipos";
|
||||
import { RemitAdministrativu } from "./remit_administrativus";
|
||||
import { RemitSuco } from "./remit_sucos";
|
||||
|
||||
@Entity("remit_indo_provinces", { schema: "remits" })
|
||||
export class RemitIndoProvince {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
})
|
||||
code: 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;
|
||||
}
|
||||
40
src/entity/remit_partner_callbacks.ts
Normal file
40
src/entity/remit_partner_callbacks.ts
Normal file
@ -0,0 +1,40 @@
|
||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
import { RemitPartner } from "./remit_partners";
|
||||
import { RemitDocumentType } from "../types/remit";
|
||||
|
||||
@Entity("remit_partner_callbacks", { schema: "remits" })
|
||||
export class RemitPartnerCallback {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@ManyToOne(() => RemitPartner, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
partner: RemitPartner;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
})
|
||||
url: 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;
|
||||
}
|
||||
54
src/entity/remit_transaction_partner_callback_logs.ts
Normal file
54
src/entity/remit_transaction_partner_callback_logs.ts
Normal file
@ -0,0 +1,54 @@
|
||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
import { RemitPartner } from "./remit_partners";
|
||||
import { RemitDocumentType } from "../types/remit";
|
||||
import { RemitTransaction } from "./remit_transactions";
|
||||
import { RemitPartnerCallback } from "./remit_partner_callbacks";
|
||||
|
||||
@Entity("remit_transaction_partner_callback_logs", { schema: "remits" })
|
||||
export class RemitTransactionPartnerCallbackLog {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@ManyToOne(() => RemitTransaction, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
transaction: RemitTransaction;
|
||||
|
||||
@ManyToOne(() => RemitPartner, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
partner: RemitPartner;
|
||||
|
||||
@ManyToOne(() => RemitPartnerCallback, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
partner_callback: RemitPartnerCallback;
|
||||
|
||||
@Column({
|
||||
length: 256,
|
||||
})
|
||||
url: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "jsonb",
|
||||
})
|
||||
header: string;
|
||||
|
||||
@Column({
|
||||
type: "jsonb",
|
||||
})
|
||||
body: any;
|
||||
|
||||
@Column()
|
||||
request_at: Date;
|
||||
|
||||
@Column({
|
||||
length: 4096,
|
||||
})
|
||||
response: string;
|
||||
|
||||
@Column()
|
||||
response_at: Date;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
}
|
||||
@ -95,6 +95,33 @@ export class RemitTransaction {
|
||||
@Column({ nullable: true, length: 256 })
|
||||
approved_by: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 4096,
|
||||
})
|
||||
note: String;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 4096,
|
||||
})
|
||||
remark: String;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 4096,
|
||||
})
|
||||
supplier_reference: String;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "int2",
|
||||
})
|
||||
callback_count: Number;
|
||||
|
||||
@Column({ nullable: true })
|
||||
callback_at: Date;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
10
src/index.ts
10
src/index.ts
@ -118,6 +118,10 @@ import { RemitConfigTransactionType } from "./entity/remit_config_transaction_ty
|
||||
import { RemitConfigChannel } from "./entity/remit_config_channels";
|
||||
import { RemitConfigTransactionInfo } from "./entity/remit_config_transaction_infos";
|
||||
import { RemitConfigBoom } from "./entity/remit_config_booms";
|
||||
import { RemitIndoProvince } from "./entity/remit_indo_provinces";
|
||||
import { RemitIndoCity } from "./entity/remit_indo_cities";
|
||||
import { RemitPartnerCallback } from "./entity/remit_partner_callbacks";
|
||||
import { RemitTransactionPartnerCallbackLog } from "./entity/remit_transaction_partner_callback_logs";
|
||||
|
||||
import {
|
||||
RemitPartnerType, //
|
||||
@ -201,6 +205,7 @@ import { BriapiLog } from "./entity/briapi_logs";
|
||||
import { BriapiAppendixBank } from "./entity/briapi_appendix_banks";
|
||||
import { BriapiAppendixWallet } from "./entity/briapi_appendix_wallets";
|
||||
import { BriapiAppendixId } from "./entity/briapi_appendix_ids";
|
||||
import { BriapiBrifastIdentityType } from "./types/briapi";
|
||||
|
||||
import { TcelLog } from "./entity/tcel_logs";
|
||||
import { TcelConfig } from "./entity/tcel_configs";
|
||||
@ -362,6 +367,7 @@ export {
|
||||
BriapiAppendixBank,
|
||||
BriapiAppendixWallet,
|
||||
BriapiAppendixId,
|
||||
BriapiBrifastIdentityType,
|
||||
RemitMunisipo,
|
||||
RemitAdministrativu,
|
||||
RemitSuco,
|
||||
@ -404,6 +410,10 @@ export {
|
||||
RemitConfigChannel,
|
||||
RemitConfigTransactionInfo,
|
||||
RemitConfigBoom,
|
||||
RemitIndoProvince,
|
||||
RemitIndoCity,
|
||||
RemitPartnerCallback,
|
||||
RemitTransactionPartnerCallbackLog,
|
||||
TcelConfig,
|
||||
TcelLog,
|
||||
};
|
||||
|
||||
7
src/types/briapi.ts
Normal file
7
src/types/briapi.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export enum BriapiBrifastIdentityType {
|
||||
"passport" = "1",
|
||||
"citizen_personal_id" = "2",
|
||||
"driver_license" = "3",
|
||||
"others" = "4",
|
||||
"account_number" = "5",
|
||||
}
|
||||
Reference in New Issue
Block a user