mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
feat: Transaction Link Model
This commit is contained in:
parent
7ddfeed97d
commit
437da5eeda
33
backend/src/graphql/model/TransactionLink.ts
Normal file
33
backend/src/graphql/model/TransactionLink.ts
Normal 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
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user