This commit is contained in:
syuilo 2019-04-13 20:02:31 +09:00
parent 99786612eb
commit 9c990842ee

View file

@ -19,11 +19,15 @@ export class AuthSession {
}) })
public token: string; public token: string;
@Column(id()) @Column({
...id(),
nullable: true
})
public userId: User['id']; public userId: User['id'];
@ManyToOne(type => User, { @ManyToOne(type => User, {
onDelete: 'CASCADE' onDelete: 'CASCADE',
nullable: true
}) })
@JoinColumn() @JoinColumn()
public user: User | null; public user: User | null;