diff --git a/tone-page-server/src/user/entities/user.entity.ts b/tone-page-server/src/user/entities/user.entity.ts index f7eebe2..5b79091 100644 --- a/tone-page-server/src/user/entities/user.entity.ts +++ b/tone-page-server/src/user/entities/user.entity.ts @@ -7,10 +7,7 @@ import { v4 as uuidv4 } from 'uuid'; @Index("IDX_user_email", ["email"], { unique: true, where: "email IS NOT NULL" }) @Index("IDX_user_phone", ["phone"], { unique: true, where: "phone IS NOT NULL" }) export class User { - @PrimaryGeneratedColumn() - id: number; - - @Column('uuid', { default: () => 'gen_random_uuid()' }) + @PrimaryGeneratedColumn('uuid') userId: string; @Column({ length: 32 }) diff --git a/tone-page-server/src/user/user.service.ts b/tone-page-server/src/user/user.service.ts index 15ee244..1844f18 100644 --- a/tone-page-server/src/user/user.service.ts +++ b/tone-page-server/src/user/user.service.ts @@ -46,7 +46,7 @@ export class UserService { if (!existingUser) { throw new BadRequestException('User not found'); } - await this.userRepository.softDelete(existingUser.id); + await this.userRepository.softDelete(existingUser.userId); } hashPassword(password: string, salt: string): string {