mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-25 22:47:54 +00:00
authentication module done
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { Column, Entity } from 'typeorm';
|
||||
import { AbstractEntity } from '../../abstract/entities/abstract.entity';
|
||||
import { SessionDto } from '../dtos/session.dto';
|
||||
|
||||
@Entity({ name: 'userSession' })
|
||||
export class UserSessionEntity extends AbstractEntity<SessionDto> {
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
public uuid: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
userId: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
public loginTime: Date;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
public isLoggedOut: boolean;
|
||||
|
||||
constructor(partial: Partial<UserSessionEntity>) {
|
||||
super();
|
||||
Object.assign(this, partial);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user