feat: 添加passkey实体

This commit is contained in:
2025-12-18 12:16:28 +08:00
parent 77b7bf8ab2
commit 5fb106ec26
2 changed files with 41 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
import { PasskeyCredential } from 'src/auth/entity/passkey-credential.entity';
import { Role } from 'src/auth/role.enum';
import {
BeforeInsert,
@@ -6,6 +7,7 @@ import {
DeleteDateColumn,
Entity,
Index,
OneToMany,
PrimaryGeneratedColumn,
UpdateDateColumn,
} from 'typeorm';
@@ -94,6 +96,9 @@ export class User {
@Column({ type: 'jsonb', default: [] })
roles: RoleItem[];
@OneToMany(() => PasskeyCredential, credential => credential.user)
passkeys?: PasskeyCredential[];
}
export class UserPublicProfile {