feat: add medical test entities
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Role } from '@/common/enums/roles.enum';
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
@@ -42,6 +43,13 @@ export class User {
|
||||
})
|
||||
password?: string;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: Role,
|
||||
default: Role.USER,
|
||||
})
|
||||
role: Role;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { HashingProvider } from '@/common/modules/hashing/providers/hashing.provider';
|
||||
import { Injectable, RequestTimeoutException } from '@nestjs/common';
|
||||
import { I18nService } from 'nestjs-i18n';
|
||||
import { User } from '../user.entity';
|
||||
import { User } from '../entities/user.entity';
|
||||
import { UpdateProfileDTO } from '../dto/update-profile.dto';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
RequestTimeoutException,
|
||||
} from '@nestjs/common';
|
||||
import { Repository } from 'typeorm';
|
||||
import { User } from '../user.entity';
|
||||
import { User } from '../entities/user.entity';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { UpdateProfileDTO } from '../dto/update-profile.dto';
|
||||
import { UserProfileProvider } from './user-profile.provider';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Body, Controller, Get, Patch } from '@nestjs/common';
|
||||
import { UsersService } from './providers/users.service';
|
||||
import { ActiveUser } from '@/common/decorators/active-user.decorator';
|
||||
import { User } from './user.entity';
|
||||
import { User } from './entities/user.entity';
|
||||
import { UpdateProfileDTO } from './dto/update-profile.dto';
|
||||
|
||||
@Controller('users')
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Module } from '@nestjs/common';
|
||||
import { UsersController } from './users.controller';
|
||||
import { UsersService } from './providers/users.service';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { User } from './user.entity';
|
||||
import { User } from './entities/user.entity';
|
||||
import { HashingModule } from '@/common/modules/hashing/hashing.module';
|
||||
import { UserProfileProvider } from './providers/user-profile.provider';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user