mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
26 lines
689 B
TypeScript
26 lines
689 B
TypeScript
import { BaseEntity, Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm'
|
|
import { LoginUser } from './LoginUser'
|
|
|
|
@Entity('login_user_backups')
|
|
export class LoginUserBackup extends BaseEntity {
|
|
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
|
id: number
|
|
|
|
@Column({ type: 'text', name: 'passphrase', nullable: false })
|
|
passphrase: string
|
|
|
|
@Column({ name: 'user_id', nullable: false })
|
|
userId: number
|
|
|
|
@Column({ name: 'mnemonic_type', default: -1 })
|
|
mnemonicType: number
|
|
|
|
@OneToOne(
|
|
() => LoginUser,
|
|
(loginUser) => loginUser.loginUserBackup,
|
|
{ nullable: false },
|
|
)
|
|
@JoinColumn({ name: 'user_id' })
|
|
loginUser: LoginUser
|
|
}
|