import { Injectable } from '@nestjs/common';
import { BaseDataService } from 'src/core/modules/data/service/base-data.service';
import { NewsEntity } from '../../domain/entities/news.entity';
import { InjectRepository } from '@nestjs/typeorm';
import { NewsModel } from '../models/news.model';
import { CONNECTION_NAME } from 'src/core/strings/constants/base.constants';
import { Repository } from 'typeorm';

@Injectable()
export class NewsDataService extends BaseDataService<NewsEntity> {
  constructor(
    @InjectRepository(NewsModel, CONNECTION_NAME.DEFAULT)
    private repo: Repository<NewsModel>,
  ) {
    super(repo);
  }
}
