Skip to content

Commit

Permalink
Merge pull request #34 from plus-tdd/feature/alarm
Browse files Browse the repository at this point in the history
도커 수정
  • Loading branch information
codeing999 authored Jul 16, 2023
2 parents 8362a30 + f1a07a2 commit edae3e4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN npm install -g @nestjs/cli && npm install
# 앱 소스 코드 복사
COPY . .

# RUN npm run build
RUN npm run build

# 포트 노출
EXPOSE 3000
Expand Down
39 changes: 21 additions & 18 deletions src/module/doctor/doctor.seeder.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
import { Inject, Injectable } from "@nestjs/common";
import { DataFactory, FactoryValue, Seeder } from "nestjs-seeder";
import { DoctorRepositoryImpl } from "./data/doctor.db";
import { DoctorEntity } from "./data/doctor.entity";
import { Doctor } from "./domain/doctor.model";
import { DOCTOR_REPOSITORY, DoctorRepository } from "./domain/docter.repository";
import { Inject, Injectable } from '@nestjs/common';
import { DataFactory, FactoryValue, Seeder } from 'nestjs-seeder';
import { DoctorRepositoryImpl } from './data/doctor.db';
import { DoctorEntity } from './data/doctor.entity';
import { Doctor } from './domain/doctor.model';
import {
DOCTOR_REPOSITORY,
DoctorRepository,
} from './domain/docter.repository';

@Injectable()
export class DoctorSeeder implements Seeder {
constructor(
@Inject(DOCTOR_REPOSITORY)
private readonly doctorRepository : DoctorRepository
) {}
constructor(
@Inject(DOCTOR_REPOSITORY)
private readonly doctorRepository: DoctorRepository,
) {}

seed(): Promise<any> {
const doctors = DataFactory.createForClass(DoctorEntity).generate(10);
seed(): Promise<any> {
const doctors = DataFactory.createForClass(DoctorEntity).generate(10);

return this.doctorRepository.createMany(doctors);
}
drop(): Promise<any> {
return this.doctorRepository.deleteAll();
}
}
return this.doctorRepository.createMany(doctors);
}
drop(): Promise<any> {
return this.doctorRepository.deleteAll();
}
}

0 comments on commit edae3e4

Please sign in to comment.