mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
27 lines
891 B
TypeScript
27 lines
891 B
TypeScript
import { Community } from '../entity/Community'
|
|
|
|
import { AbstractLoggingView } from './AbstractLogging.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,
|
|
foreign: this.self.foreign,
|
|
url: this.self.url,
|
|
publicKey: this.self.publicKey.toString(this.bufferStringFormat),
|
|
communityUuid: this.self.communityUuid,
|
|
authenticatedAt: this.dateToString(this.self.authenticatedAt),
|
|
name: this.self.name,
|
|
description: this.self.description?.substring(0, 24),
|
|
creationDate: this.dateToString(this.self.creationDate),
|
|
createdAt: this.dateToString(this.self.createdAt),
|
|
updatedAt: this.dateToString(this.self.updatedAt),
|
|
}
|
|
}
|
|
}
|