From 5d7241da14dd7d074084ab1b7abaffaf51f003d1 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Sat, 6 Nov 2021 19:29:15 +0100 Subject: [PATCH] LoginElopageBuys Entity model --- .../LoginElopageBuys.ts | 52 +++++++++++++++++++ database/entity/LoginElopageBuys.ts | 1 + database/entity/index.ts | 4 +- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 database/entity/0003-login_server_tables/LoginElopageBuys.ts create mode 100644 database/entity/LoginElopageBuys.ts diff --git a/database/entity/0003-login_server_tables/LoginElopageBuys.ts b/database/entity/0003-login_server_tables/LoginElopageBuys.ts new file mode 100644 index 000000000..fc0d6c355 --- /dev/null +++ b/database/entity/0003-login_server_tables/LoginElopageBuys.ts @@ -0,0 +1,52 @@ +import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm' + +@Entity('login_elopage_buys') +export class LoginElopageBuys extends BaseEntity { + @PrimaryGeneratedColumn('increment', { unsigned: true }) + id: number + + @Column({ name: 'elopage_user_id', nullable: false }) + elopageUserId: number + + @Column({ name: 'affiliate_program_id', nullable: false }) + affiliateProgramId: number + + @Column({ name: 'publisher_id', nullable: false }) + publisherId: number + + @Column({ name: 'order_id', nullable: false }) + orderId: number + + @Column({ name: 'product_id', nullable: false }) + productId: number + + @Column({ name: 'product_price', nullable: false }) + productPrice: number + + @Column({ + name: 'payer_email', + length: 255, + nullable: false, + charset: 'utf8', + collation: 'utf8_bin', + }) + payerEmail: string + + @Column({ + name: 'publisher_email', + length: 255, + nullable: false, + charset: 'utf8', + collation: 'utf8_bin', + }) + publisherEmail: string + + @Column({ nullable: false }) + payed: boolean + + @Column({ name: 'success_date', nullable: false }) + successDate: Date + + @Column({ length: 255, nullable: false }) + event: string +} diff --git a/database/entity/LoginElopageBuys.ts b/database/entity/LoginElopageBuys.ts new file mode 100644 index 000000000..6a1f3230b --- /dev/null +++ b/database/entity/LoginElopageBuys.ts @@ -0,0 +1 @@ +export { LoginElopageBuys } from './0003-login_server_tables/LoginElopageBuys' diff --git a/database/entity/index.ts b/database/entity/index.ts index ff1d34d9e..5e4e98118 100644 --- a/database/entity/index.ts +++ b/database/entity/index.ts @@ -1,4 +1,5 @@ import { Balance } from './Balance' +import { LoginElopageBuys } from './LoginElopageBuys' import { LoginEmailOptIn } from './LoginEmailOptIn' import { LoginUser } from './LoginUser' import { LoginUserBackup } from './LoginUserBackup' @@ -12,9 +13,10 @@ import { UserTransaction } from './UserTransaction' export const entities = [ Balance, + LoginElopageBuys, + LoginEmailOptIn, LoginUser, LoginUserBackup, - LoginEmailOptIn, Migration, Transaction, TransactionCreation,