mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
26 lines
644 B
TypeScript
26 lines
644 B
TypeScript
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
import { ObjectType, Field, Int } from 'type-graphql'
|
|
|
|
@ObjectType()
|
|
export class Decay {
|
|
constructor(json: any) {
|
|
this.balance = Number(json.balance)
|
|
this.decayStart = json.decay_start
|
|
this.decayEnd = json.decay_end
|
|
this.decayDuration = json.decay_duration
|
|
}
|
|
|
|
@Field(() => Number)
|
|
balance: number
|
|
|
|
@Field(() => Int, { nullable: true })
|
|
decayStart?: number
|
|
|
|
@Field(() => Int, { nullable: true })
|
|
decayEnd?: number
|
|
|
|
@Field(() => String, { nullable: true })
|
|
decayDuration?: string
|
|
}
|