mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 03:57:06 -04:00
Add Session entity
This entity implements the Session interface from connect-typeorm, which we will later use to store session data from express-session. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
ef92ab73f9
commit
6bee3b16cf
3 changed files with 77 additions and 2 deletions
15
src/users/session.entity.ts
Normal file
15
src/users/session.entity.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { ISession } from 'connect-typeorm';
|
||||
import { Column, Entity, Index, PrimaryColumn } from 'typeorm/index';
|
||||
|
||||
@Entity()
|
||||
export class Session implements ISession {
|
||||
@PrimaryColumn('varchar', { length: 255 })
|
||||
public id = '';
|
||||
|
||||
@Index()
|
||||
@Column('bigint')
|
||||
public expiredAt = Date.now();
|
||||
|
||||
@Column('text')
|
||||
public json = '';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue