diff --git a/src/entity/briapi_appendix_banks.ts b/src/entity/briapi_appendix_banks.ts new file mode 100644 index 0000000..78e7800 --- /dev/null +++ b/src/entity/briapi_appendix_banks.ts @@ -0,0 +1,30 @@ +import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'; + +@Entity('briapi_appendix_banks', { schema: 'briapis' }) +export class BriapiAppendixBank { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ + length: 256 + }) + code: string; + + @Column({ + length: 256 + }) + name: string; + + @Column({ + length: 1024 + }) + description: string; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column({ nullable: true }) + @UpdateDateColumn() + updated_at: Date; +} \ No newline at end of file diff --git a/src/entity/briapi_appendix_ids.ts b/src/entity/briapi_appendix_ids.ts new file mode 100644 index 0000000..8199898 --- /dev/null +++ b/src/entity/briapi_appendix_ids.ts @@ -0,0 +1,30 @@ +import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'; + +@Entity('briapi_appendix_ids', { schema: 'briapis' }) +export class BriapiAppendixId { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ + length: 256 + }) + code: string; + + @Column({ + length: 256 + }) + name: string; + + @Column({ + length: 1024 + }) + description: string; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column({ nullable: true }) + @UpdateDateColumn() + updated_at: Date; +} \ No newline at end of file diff --git a/src/entity/briapi_appendix_wallets.ts b/src/entity/briapi_appendix_wallets.ts new file mode 100644 index 0000000..abea741 --- /dev/null +++ b/src/entity/briapi_appendix_wallets.ts @@ -0,0 +1,30 @@ +import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'; + +@Entity('briapi_appendix_wallets', { schema: 'briapis' }) +export class BriapiAppendixWallet { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ + length: 256 + }) + code: string; + + @Column({ + length: 256 + }) + name: string; + + @Column({ + length: 1024 + }) + description: string; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column({ nullable: true }) + @UpdateDateColumn() + updated_at: Date; +} \ No newline at end of file diff --git a/src/entity/briapi_configs.ts b/src/entity/briapi_configs.ts new file mode 100644 index 0000000..ef680c6 --- /dev/null +++ b/src/entity/briapi_configs.ts @@ -0,0 +1,29 @@ +import { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, JoinColumn, ManyToOne, PrimaryGeneratedColumn, Unique, UpdateDateColumn } from 'typeorm'; +import { Branch } from './branchs'; + +@Entity('briapi_configs', { schema: 'briapis' }) +export class BriapiConfig { + @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; +} \ No newline at end of file diff --git a/src/entity/briapi_logs.ts b/src/entity/briapi_logs.ts new file mode 100644 index 0000000..23333b7 --- /dev/null +++ b/src/entity/briapi_logs.ts @@ -0,0 +1,43 @@ +import { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, JoinColumn, ManyToOne, PrimaryGeneratedColumn, Unique, UpdateDateColumn } from 'typeorm'; +import { Branch } from './branchs'; +import { Application } from './application'; + +@Entity('briapi_logs', { schema: 'briapis' }) +export class BriapiLog { + @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() + response_at: Date; + + @Column() + @CreateDateColumn() + created_at: Date; +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index edbf0bc..9deffe4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -111,7 +111,11 @@ import { BrilinkMerchantTerminalMenu } from './entity/brilink_merchant_terminal_ import { BrilinkMerchantTerminalUser } from './entity/brilink_merchant_terminal_users' import { BrilinkTerminalUserRefreshToken } from './entity/brilink_merchant_terminal_user_refresh_token' - +import { BriapiConfig } from './entity/briapi_configs' +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"; export { User, // @@ -240,4 +244,11 @@ export { RemitBank, RemitConfigTransaction, RemitConfigAllocation, + + BriapiConfig, + BriapiLog, + BriapiAppendixBank, + BriapiAppendixWallet, + BriapiAppendixId + };