Skip to content

Commit

Permalink
🐛 fix: typeorm 의존성 설치 및 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
swkim12345 committed Nov 18, 2024
1 parent 93e7ac3 commit 1d27504
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import {
import { openApiToken } from './openapiToken.api';
import { Stock } from '@/stock/domain/stock.entity';
import { StockData, StockMinutely } from '@/stock/domain/stockData.entity';
import { Injectable } from '@nestjs/common';

@Injectable()
export class OpenapiMinuteData {
private stock: Stock[];
private readonly entity = StockMinutely;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
StockMonthly,
StockYearly,
} from '@/stock/domain/stockData.entity';
import { Injectable } from '@nestjs/common';

const DATE_TO_ENTITY = {
D: StockDaily,
Expand All @@ -33,11 +34,12 @@ const DATE_TO_MONTH = {

const INTERVALS = 4000;

@Injectable()
export class OpenapiPeriodData {
private readonly url: string =
'/uapi/domestic-stock/v1/quotations/inquire-daily-itemchartprice';
public constructor(private readonly datasourse: DataSource) {
//this.getItemChartPriceCheck();
this.getItemChartPriceCheck();
}

@Cron('0 1 * * 1-5')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ import { Module } from '@nestjs/common';
import { OpenapiMinuteData } from './api/openapiMinuteData.api';
import { OpenapiPeriodData } from './api/openapiPeriodData.api';
import { OpenapiScraperService } from './openapi-scraper.service';
import { DataSource } from 'typeorm';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Stock } from '@/stock/domain/stock.entity';
import { StockDaily, StockMinutely, StockMonthly, StockWeekly, StockYearly } from '@/stock/domain/stockData.entity';
import { StockLiveData } from '@/stock/domain/stockLiveData.entity';
import { StockDetail } from '@/stock/domain/stockDetail.entity';

@Module({
imports: [],
imports: [TypeOrmModule.forFeature([Stock, StockMinutely , StockDaily, StockWeekly, StockMonthly, StockYearly, StockLiveData, StockDetail])],
controllers: [],
providers: [OpenapiPeriodData, OpenapiMinuteData, OpenapiScraperService],
})
Expand Down

0 comments on commit 1d27504

Please sign in to comment.