gradido/backend/src/logging/DecayLogging.view.ts
2025-06-23 14:06:21 +02:00

22 lines
641 B
TypeScript

import { AbstractLoggingView } from 'database'
import { Decay } from '@/graphql/model/Decay'
import type { Decay as DecayInterface } from 'shared'
export class DecayLoggingView extends AbstractLoggingView {
public constructor(private self: Decay | DecayInterface) {
super()
}
public toJSON(): any {
return {
balance: this.decimalToString(this.self.balance),
decay: this.decimalToString(this.self.decay),
roundedDecay: this.decimalToString(this.self.roundedDecay),
start: this.dateToString(this.self.start),
end: this.dateToString(this.self.end),
duration: this.self.duration,
}
}
}