fix(session-entity): update for connect-typeorm v2

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
renovate[bot] 2022-07-10 18:25:18 +00:00 committed by David Mehren
parent 39f6ef5e8e
commit 62be0ba3c0

View file

@ -4,7 +4,14 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { ISession } from 'connect-typeorm';
import { Column, Entity, Index, ManyToOne, PrimaryColumn } from 'typeorm';
import {
Column,
DeleteDateColumn,
Entity,
Index,
ManyToOne,
PrimaryColumn,
} from 'typeorm';
import { Author } from '../authors/author.entity';
@ -20,6 +27,9 @@ export class Session implements ISession {
@Column('text')
public json = '';
@DeleteDateColumn()
public destroyedAt?: Date;
@ManyToOne(() => Author, (author) => author.sessions)
author: Promise<Author>;
}