mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Created the LoginEmailOptIn table entity.
This commit is contained in:
parent
137d683351
commit
d097e5cd76
26
database/entity/0003-login_server_tables/LoginEmailOptIn.ts
Normal file
26
database/entity/0003-login_server_tables/LoginEmailOptIn.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('login_email_opt_in')
|
||||||
|
export class LoginEmailOptIn extends BaseEntity {
|
||||||
|
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
||||||
|
id: number
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
userId: number
|
||||||
|
|
||||||
|
@Column({ name: 'verification_code', type: 'bigint', unsigned: true })
|
||||||
|
verificationCode: BigInt
|
||||||
|
|
||||||
|
@Column({ name: 'email_opt_in_type_id' })
|
||||||
|
emailOptInTypeId: number
|
||||||
|
|
||||||
|
@Column({ name: 'created', default: () => 'CURRENT_TIMESTAMP' })
|
||||||
|
createdAt: Date
|
||||||
|
|
||||||
|
@Column({ name: 'resend_count', default: 0 })
|
||||||
|
resendCount: number
|
||||||
|
|
||||||
|
@Column({ name: 'updated', default: () => 'CURRENT_TIMESTAMP' })
|
||||||
|
updatedAt: Date
|
||||||
|
}
|
||||||
1
database/entity/LoginEmailOptIn.ts
Normal file
1
database/entity/LoginEmailOptIn.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export { LoginEmailOptIn } from './0003-login_server_tables/LoginEmailOptIn'
|
||||||
Loading…
x
Reference in New Issue
Block a user