diff --git a/src/entity/remit_partner_api_logs.ts b/src/entity/remit_partner_api_logs.ts new file mode 100644 index 0000000..a4e68cd --- /dev/null +++ b/src/entity/remit_partner_api_logs.ts @@ -0,0 +1,73 @@ +import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; +import { RemitPartner } from "./remit_partners"; + +@Entity("remit_partner_api_logs", { schema: "remits" }) +export class RemitPartnerApiLog { + @PrimaryGeneratedColumn("uuid") + id: string; + + @ManyToOne(() => RemitPartner, { onDelete: "RESTRICT" }) + @JoinColumn() + partner: RemitPartner; + + @Column({ + nullable: true, + }) + request_at: Date; + + @Column({ + nullable: true, + length: 256, + }) + path: string; + + @Column({ + nullable: true, + length: 256, + }) + verb: string; + + @Column({ + nullable: true, + length: 256, + }) + signature: string; + + @Column({ + nullable: true, + length: 256, + }) + timestamp: string; + + @Column({ + nullable: true, + type: 'text' + }) + decode: string; + + @Column({ + nullable: true, + type: 'text' + }) + param: string; + + @Column({ + nullable: true, + type: 'text' + }) + response: string; + + @Column({ + nullable: true, + type: 'text' + }) + response_at: string; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column({ nullable: true }) + @UpdateDateColumn() + updated_at: Date; +} diff --git a/src/index.ts b/src/index.ts index 3575b89..c53f461 100644 --- a/src/index.ts +++ b/src/index.ts @@ -99,6 +99,7 @@ import { RemitConfigPurpose } from "./entity/remit_config_purposes"; import { RemitConfigSourceIncome } from "./entity/remit_config_source_incomes"; import { RemitPartnerAccounts } from "./entity/remit_partner_accounts"; import { RemitPartnerApi } from "./entity/remit_partner_apis"; +import { RemitPartnerApiLog } from "./entity/remit_partner_api_logs"; import { RemitPartnerDocument } from "./entity/remit_partner_documents"; import { RemitPartnerFee } from "./entity/remit_partner_fees"; import { RemitPartnerOwners } from "./entity/remit_partner_owners"; @@ -347,6 +348,7 @@ export { RemitConfigSourceIncome, RemitPartnerAccounts, RemitPartnerApi, + RemitPartnerApiLog, RemitPartnerDocument, RemitPartnerFee, RemitPartnerOwners, @@ -354,5 +356,5 @@ export { RemitPartner, RemitSender, RemitSenderIdentity, - RemitTransaction + RemitTransaction, };