mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
0001-init_db entities
This commit is contained in:
parent
c868ac93b5
commit
1639d6305c
26
database/entity/0001-init_db/User.ts
Normal file
26
database/entity/0001-init_db/User.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
|
||||
|
||||
// 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
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user