update api reset password

This commit is contained in:
2024-11-27 19:00:17 +07:00
parent fd226a43ac
commit 7ec741f459
3 changed files with 28 additions and 8 deletions

View File

@ -1,5 +1,5 @@
import bcrypt from 'bcryptjs';
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from 'typeorm';
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index } from 'typeorm';
import { Status } from '../types/status';
@ -41,6 +41,13 @@ export class User {
})
id_role: string;
@Index()
@Column({
nullable: true,
type: 'uuid'
})
reset_token: string;
@Column({
nullable: false,
length: 64