mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
31 lines
673 B
TypeScript
31 lines
673 B
TypeScript
import { BaseEntity, Entity, PrimaryGeneratedColumn, Column, OneToMany } from 'typeorm'
|
|
import { UserSetting } from './UserSetting'
|
|
|
|
// Moriz: I do not like the idea of having two user tables
|
|
@Entity('state_users')
|
|
export class User extends BaseEntity {
|
|
@PrimaryGeneratedColumn()
|
|
id: number
|
|
|
|
@Column({ type: 'binary', length: 32, name: 'public_key' })
|
|
pubkey: Buffer
|
|
|
|
@Column()
|
|
email: string
|
|
|
|
@Column({ name: 'first_name' })
|
|
firstName: string
|
|
|
|
@Column({ name: 'last_name' })
|
|
lastName: string
|
|
|
|
@Column()
|
|
username: string
|
|
|
|
@Column()
|
|
disabled: boolean
|
|
|
|
@OneToMany(() => UserSetting, (userSetting) => userSetting.user)
|
|
settings: UserSetting[]
|
|
}
|