mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add one to one relation from login_user to login_user_backup
This commit is contained in:
parent
8f066595fc
commit
0ae04898f4
@ -1,16 +1,18 @@
|
|||||||
import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
|
import { BaseEntity, Entity, PrimaryGeneratedColumn, Column, JoinColumn, OneToOne } from 'typeorm'
|
||||||
|
import { LoginUser } from '../LoginUser'
|
||||||
|
|
||||||
@Entity('login_user_backups')
|
@Entity('login_user_backups')
|
||||||
export class LoginUserBackup extends BaseEntity {
|
export class LoginUserBackup extends BaseEntity {
|
||||||
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
||||||
id: number
|
id: number
|
||||||
|
|
||||||
@Column({ name: 'user_id', nullable: false })
|
|
||||||
userId: number
|
|
||||||
|
|
||||||
@Column({ type: 'text', name: 'passphrase', nullable: false })
|
@Column({ type: 'text', name: 'passphrase', nullable: false })
|
||||||
passphrase: string
|
passphrase: string
|
||||||
|
|
||||||
@Column({ name: 'mnemonic_type', default: -1 })
|
@Column({ name: 'mnemonic_type', default: -1 })
|
||||||
mnemonicType: number
|
mnemonicType: number
|
||||||
|
|
||||||
|
@OneToOne(() => LoginUser, { nullable: false })
|
||||||
|
@JoinColumn({ name: 'user_id' })
|
||||||
|
loginUser: LoginUser
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user