feat: Transaction Link Model

This commit is contained in:
Moriz Wahl 2022-03-09 11:05:01 +01:00
parent 7ddfeed97d
commit 437da5eeda

View File

@ -0,0 +1,33 @@
import { ObjectType, Field } from 'type-graphql'
import Decimal from 'decimal.js-light'
import { User } from './User'
@ObjectType()
export class TransactionLink {
@Field(() => Number)
id: number
@Field(() => User)
user: User
@Field(() => Decimal)
amount: Decimal
@Field(() => String)
memo: string
@Field(() => Date)
createdAt: Date
@Field(() => Date)
validUntil: Date
@Field(() => Boolean)
showEmail: boolean
@Field(() => Date, { nullable: true })
redeemedAt: Date | null
@Field(() => User, { nullable: true })
redeemedBy: User | null
}