mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 10:46:17 +00:00
use pgcrypto
This commit is contained in:
@ -31,6 +31,8 @@ import { UserOtpEntity } from '../modules/user-otp/entities';
|
||||
maxUses: 7500, // close (and replace) a connection after it has been used 7500 times (see below for discussion)
|
||||
},
|
||||
continuationLocalStorage: true,
|
||||
ssl: Boolean(JSON.parse(configService.get('DB_SSL'))),
|
||||
|
||||
}),
|
||||
}),
|
||||
],
|
||||
|
@ -5,6 +5,8 @@ import { SessionDto } from '../dtos/session.dto';
|
||||
@Entity({ name: 'userSession' })
|
||||
export class UserSessionEntity extends AbstractEntity<SessionDto> {
|
||||
@Column({
|
||||
type: 'uuid',
|
||||
default: () => 'gen_random_uuid()',
|
||||
nullable: false,
|
||||
})
|
||||
public uuid: string;
|
||||
|
@ -6,6 +6,8 @@ import { OtpType } from '@app/common/constants/otp-type.enum';
|
||||
@Entity({ name: 'user-otp' })
|
||||
export class UserOtpEntity extends AbstractEntity<UserOtpDto> {
|
||||
@Column({
|
||||
type: 'uuid',
|
||||
default: () => 'gen_random_uuid()',
|
||||
nullable: false,
|
||||
})
|
||||
public uuid: string;
|
||||
|
@ -5,6 +5,8 @@ import { AbstractEntity } from '../../abstract/entities/abstract.entity';
|
||||
@Entity({ name: 'user' })
|
||||
export class UserEntity extends AbstractEntity<UserDto> {
|
||||
@Column({
|
||||
type: 'uuid',
|
||||
default: () => 'gen_random_uuid()', // Use gen_random_uuid() for default value
|
||||
nullable: false,
|
||||
})
|
||||
public uuid: string;
|
||||
|
Reference in New Issue
Block a user