mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
25 lines
898 B
TypeScript
25 lines
898 B
TypeScript
import { Community } from '@entity/Community'
|
|
|
|
import { AbstractLoggingView } from './AbstractLogging.view'
|
|
import { AccountLoggingView } from './AccountLogging.view'
|
|
|
|
export class CommunityLoggingView extends AbstractLoggingView {
|
|
public constructor(private self: Community) {
|
|
super()
|
|
}
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
public toJSON(): any {
|
|
return {
|
|
id: this.self.id,
|
|
iotaTopic: this.self.iotaTopic,
|
|
foreign: this.self.foreign,
|
|
publicKey: this.self.rootPubkey?.toString(this.bufferStringFormat),
|
|
createdAt: this.dateToString(this.self.createdAt),
|
|
confirmedAt: this.dateToString(this.self.confirmedAt),
|
|
aufAccount: this.self.aufAccount ? new AccountLoggingView(this.self.aufAccount) : undefined,
|
|
gmwAccount: this.self.gmwAccount ? new AccountLoggingView(this.self.gmwAccount) : undefined,
|
|
}
|
|
}
|
|
}
|