0001-init_db entities

This commit is contained in:
Ulf Gebhardt 2021-10-09 13:20:50 +02:00
parent 88dd162d8d
commit f7071ed945
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
7 changed files with 26 additions and 0 deletions

View 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
}