diff --git a/src/entity/telemor_logs.ts b/src/entity/telemor_logs.ts new file mode 100644 index 0000000..a91a43e --- /dev/null +++ b/src/entity/telemor_logs.ts @@ -0,0 +1,54 @@ +import { Column, CreateDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm"; +import { Application } from "./application"; + +@Entity("telemor_logs", { schema: "telemor" }) +export class TelemorLogs { + @PrimaryGeneratedColumn("uuid") + id: string; + + @ManyToOne(() => Application, { onDelete: "NO ACTION" }) + @JoinColumn({ name: "application" }) + application: Application; + + @Column({ + length: 256, + }) + url: string; + + @Column({ + type: "jsonb", + }) + header: string; + + @Column({ + type: "jsonb", + }) + body: string; + + @Column() + request_at: Date; + + @Column({ + length: 4096, + }) + response: string; + + @Column({ + length: 128, + nullable: true, + }) + supplier_reference_code: string; + + @Column({ + length: 128, + nullable: true, + }) + supplier_transaction_code: string; + + @Column() + response_at: Date; + + @Column() + @CreateDateColumn() + created_at: Date; +} diff --git a/src/entity/telemor_mosan_remit_configs.ts b/src/entity/telemor_mosan_remit_configs.ts new file mode 100644 index 0000000..e338310 --- /dev/null +++ b/src/entity/telemor_mosan_remit_configs.ts @@ -0,0 +1,28 @@ +import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; + +@Entity("telemor_mosan_remit_configs", { schema: "telemor" }) +export class TelemorMosanRemitConfig { + @PrimaryGeneratedColumn("uuid") + id: string; + + @Column({ + length: 4096, + }) + key: string; + + @Column({ + length: 4096, + }) + value: string; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column({ nullable: true }) + @UpdateDateColumn() + updated_at: Date; + + @Column({ nullable: true }) + expired_at: Date; +} diff --git a/src/index.ts b/src/index.ts index 846f3ff..9f3f071 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,3 +12,4 @@ export * from "./schema/eform"; export * from "./schema/compliance"; export * from "./schema/trx"; export * from "./schema/gps"; +export * from "./schema/telemor"; diff --git a/src/schema/telemor.ts b/src/schema/telemor.ts new file mode 100644 index 0000000..4ee94cc --- /dev/null +++ b/src/schema/telemor.ts @@ -0,0 +1,2 @@ +export * from "../entity/telemor_mosan_remit_configs"; +export * from "../entity/telemor_logs";