auth
This commit is contained in:
18
api/src/model/entitites/sso.user.entity.ts
Normal file
18
api/src/model/entitites/sso.user.entity.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm';
|
||||
import { User } from './user.entity';
|
||||
|
||||
@Entity()
|
||||
export class SSOUser {
|
||||
@PrimaryColumn({ type: 'uuid', unique: true })
|
||||
externalId: string;
|
||||
|
||||
@OneToOne(() => User, (user) => user.external)
|
||||
@JoinColumn()
|
||||
user: User;
|
||||
|
||||
@Column({ nullable: true, type: 'text' })
|
||||
accessToken: string;
|
||||
|
||||
@Column({ nullable: true, type: 'text' })
|
||||
refreshToken: string;
|
||||
}
|
||||
Reference in New Issue
Block a user