Created the LoginEmailOptIn table entity.

This commit is contained in:
elweyn 2021-11-04 12:55:04 +01:00
parent 137d683351
commit d097e5cd76
2 changed files with 27 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('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
}

View File

@ -0,0 +1 @@
export { LoginEmailOptIn } from './0003-login_server_tables/LoginEmailOptIn'