diff --git a/backend/src/graphql/models/Decay.ts b/backend/src/graphql/models/Decay.ts index 860580e8f..48ed7b8c5 100644 --- a/backend/src/graphql/models/Decay.ts +++ b/backend/src/graphql/models/Decay.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import { ObjectType, Field, Int } from 'type-graphql' -import { Transaction } from '../../typeorm/entity/Transaction' @ObjectType() export class Decay { diff --git a/backend/src/graphql/models/GdtEntry.ts b/backend/src/graphql/models/GdtEntry.ts index 7935d4181..2f4b31b00 100644 --- a/backend/src/graphql/models/GdtEntry.ts +++ b/backend/src/graphql/models/GdtEntry.ts @@ -1,16 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import { ObjectType, Field } from 'type-graphql' - -export enum GdtEntryType { - FORM = 1, - CVS = 2, - ELOPAGE = 3, - ELOPAGE_PUBLISHER = 4, - DIGISTORE = 5, - CVS2 = 6, - GLOBAL_MODIFICATOR = 7, -} +import { GdtEntryType } from '../enum/GdtEntryType' @ObjectType() export class GdtEntry { @@ -46,7 +37,7 @@ export class GdtEntry { @Field(() => String) couponCode: string - @Field(() => Number) + @Field(() => GdtEntryType) gdtEntryType: GdtEntryType @Field(() => Number) diff --git a/backend/src/graphql/models/GdtEntryList.ts b/backend/src/graphql/models/GdtEntryList.ts index 301ac179b..9d529b6f3 100644 --- a/backend/src/graphql/models/GdtEntryList.ts +++ b/backend/src/graphql/models/GdtEntryList.ts @@ -3,20 +3,6 @@ import { GdtEntry } from './GdtEntry' import { ObjectType, Field } from 'type-graphql' -@ObjectType() -export class GdtSumPerEmail { - constructor(email: string, summe: number) { - this.email = email - this.summe = summe - } - - @Field(() => String) - email: string - - @Field(() => Number) - summe: number -} - @ObjectType() export class GdtEntryList { constructor(json: any) { diff --git a/backend/src/graphql/models/GdtSumPerEmail.ts b/backend/src/graphql/models/GdtSumPerEmail.ts new file mode 100644 index 000000000..c90c7293b --- /dev/null +++ b/backend/src/graphql/models/GdtSumPerEmail.ts @@ -0,0 +1,19 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +/* +import { ObjectType, Field } from 'type-graphql' + +@ObjectType() +export class GdtSumPerEmail { + constructor(email: string, summe: number) { + this.email = email + this.summe = summe + } + + @Field(() => String) + email: string + + @Field(() => Number) + summe: number +} +*/ diff --git a/backend/src/graphql/models/Transaction.ts b/backend/src/graphql/models/Transaction.ts index 69956cf9b..3aa3c429d 100644 --- a/backend/src/graphql/models/Transaction.ts +++ b/backend/src/graphql/models/Transaction.ts @@ -53,32 +53,3 @@ export class Transaction { @Field({ nullable: true }) decay?: Decay } - -@ObjectType() -export class TransactionList { - constructor() { - this.gdtSum = 0 - this.count = 0 - this.balance = 0 - this.decay = 0 - this.decayDate = '' - } - - @Field(() => Number) - gdtSum: number - - @Field(() => Number) - count: number - - @Field(() => Number) - balance: number - - @Field(() => Number) - decay: number - - @Field(() => String) - decayDate: string - - @Field(() => [Transaction]) - transactions: Transaction[] -} diff --git a/backend/src/graphql/models/TransactionList.ts b/backend/src/graphql/models/TransactionList.ts new file mode 100644 index 000000000..0175048d1 --- /dev/null +++ b/backend/src/graphql/models/TransactionList.ts @@ -0,0 +1,33 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +import { ObjectType, Field } from 'type-graphql' +import { Transaction } from './Transaction' + +@ObjectType() +export class TransactionList { + constructor() { + this.gdtSum = 0 + this.count = 0 + this.balance = 0 + this.decay = 0 + this.decayDate = '' + } + + @Field(() => Number) + gdtSum: number + + @Field(() => Number) + count: number + + @Field(() => Number) + balance: number + + @Field(() => Number) + decay: number + + @Field(() => String) + decayDate: string + + @Field(() => [Transaction]) + transactions: Transaction[] +}