mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-15 04:59:42 +03:00
create admins endpoint
This commit is contained in:
12
backend/libs/database/admin.entity.ts
Normal file
12
backend/libs/database/admin.entity.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Column, Entity, PrimaryColumn } from 'typeorm';
|
||||
|
||||
@Entity()
|
||||
export class Admin {
|
||||
constructor(props?: Partial<Admin>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
|
||||
@PrimaryColumn()
|
||||
public id!: string;
|
||||
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { User } from './database/user.entity';
|
||||
import { Admin } from './database/admin.entity';
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([User])],
|
||||
imports: [TypeOrmModule.forFeature([User,Admin])],
|
||||
exports: [TypeOrmModule],
|
||||
})
|
||||
export class LibsModule {}
|
||||
|
||||
Reference in New Issue
Block a user