mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fixed ServerUser entity definition
This commit is contained in:
parent
4e762a12fc
commit
f8570c2693
31
database/entity/0001-init_db/ServerUser.ts
Normal file
31
database/entity/0001-init_db/ServerUser.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
|
||||
|
||||
@Entity('server_users')
|
||||
export class ServerUser extends BaseEntity {
|
||||
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
||||
id: number
|
||||
|
||||
@Column({ length: 50 })
|
||||
username: string
|
||||
|
||||
@Column({ type: 'bigint', unsigned: true })
|
||||
password: BigInt
|
||||
|
||||
@Column({ length: 50, unique: true })
|
||||
email: string
|
||||
|
||||
@Column({ length: 20, default: 'admin' })
|
||||
role: string
|
||||
|
||||
@Column({ default: 0 })
|
||||
activated: number
|
||||
|
||||
@Column({ name: 'last_login', default: null, nullable: true })
|
||||
lastLogin: Date
|
||||
|
||||
@Column({ name: 'created', default: () => 'CURRENT_TIMESTAMP' })
|
||||
created: Date
|
||||
|
||||
@Column({ name: 'created', default: () => 'CURRENT_TIMESTAMP' })
|
||||
modified: Date
|
||||
}
|
||||
@ -1,31 +1 @@
|
||||
import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
|
||||
|
||||
@Entity('server_users')
|
||||
export class ServerUser extends BaseEntity {
|
||||
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
||||
id: number
|
||||
|
||||
@Column({ length: 50 })
|
||||
username: string
|
||||
|
||||
@Column({ type: 'bigint', unsigned: true })
|
||||
password: BigInt
|
||||
|
||||
@Column({ length: 50, unique: true })
|
||||
email: string
|
||||
|
||||
@Column({ length: 20, default: 'admin' })
|
||||
role: string
|
||||
|
||||
@Column({ default: 0 })
|
||||
activated: number
|
||||
|
||||
@Column({ name: 'last_login', default: null, nullable: true })
|
||||
lastLogin: Date
|
||||
|
||||
@Column({ name: 'created', default: () => 'CURRENT_TIMESTAMP' })
|
||||
created: Date
|
||||
|
||||
@Column({ name: 'created', default: () => 'CURRENT_TIMESTAMP' })
|
||||
modified: Date
|
||||
}
|
||||
export { ServerUser } from './0001-init_db/ServerUser'
|
||||
|
||||
@ -4,6 +4,7 @@ import { LoginEmailOptIn } from './LoginEmailOptIn'
|
||||
import { LoginUser } from './LoginUser'
|
||||
import { LoginUserBackup } from './LoginUserBackup'
|
||||
import { Migration } from './Migration'
|
||||
import { ServerUser } from './ServerUser'
|
||||
import { Transaction } from './Transaction'
|
||||
import { TransactionCreation } from './TransactionCreation'
|
||||
import { TransactionSendCoin } from './TransactionSendCoin'
|
||||
@ -18,6 +19,7 @@ export const entities = [
|
||||
LoginUser,
|
||||
LoginUserBackup,
|
||||
Migration,
|
||||
ServerUser,
|
||||
Transaction,
|
||||
TransactionCreation,
|
||||
TransactionSendCoin,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user