gradido/core/src/graphql/logging/DecayLogging.view.ts
2025-08-25 16:55:29 +02:00

22 lines
634 B
TypeScript

import { AbstractLoggingView } from 'database'
import { Decay } from '../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,
}
}
}