first commit
This commit is contained in:
35
myteamwallet_backend/src/forgot/entities/forgot.entity.ts
Normal file
35
myteamwallet_backend/src/forgot/entities/forgot.entity.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
Index,
|
||||
ManyToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
DeleteDateColumn,
|
||||
} from 'typeorm';
|
||||
import { User } from '../../users/entities/user.entity';
|
||||
import { Allow } from 'class-validator';
|
||||
import { EntityHelper } from 'src/utils/entity-helper';
|
||||
|
||||
@Entity()
|
||||
export class Forgot extends EntityHelper {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Allow()
|
||||
@Column()
|
||||
@Index()
|
||||
hash: string;
|
||||
|
||||
@Allow()
|
||||
@ManyToOne(() => User, {
|
||||
eager: true,
|
||||
})
|
||||
user: User;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
|
||||
@DeleteDateColumn()
|
||||
deletedAt: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user