mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
24 lines
808 B
TypeScript
24 lines
808 B
TypeScript
import { DltTransaction } from '../entity/DltTransaction'
|
|
import { AbstractLoggingView } from './AbstractLogging.view'
|
|
import { TransactionLoggingView } from './TransactionLogging.view'
|
|
|
|
export class DltTransactionLoggingView extends AbstractLoggingView {
|
|
public constructor(private self: DltTransaction) {
|
|
super()
|
|
}
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
public toJSON(): any {
|
|
return {
|
|
id: this.self.id,
|
|
transaction: this.self.transaction
|
|
? new TransactionLoggingView(this.self.transaction).toJSON()
|
|
: { id: this.self.transactionId },
|
|
messageId: this.self.messageId,
|
|
verified: this.self.verified,
|
|
createdAt: this.dateToString(this.self.createdAt),
|
|
verifiedAt: this.dateToString(this.self.verifiedAt),
|
|
}
|
|
}
|
|
}
|