import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; import { HeaderSection } from '../entity/header-section.entity'; @Injectable() export class HeaderSectionRepository { constructor( @InjectRepository(HeaderSection) private readonly headerSectionRepository: Repository, ) {} async findByOrganizationId(organizationId: number) { return await this.headerSectionRepository.find({ where: { organization_id: organizationId }, }); } async getHeaders() { return await this.headerSectionRepository.find(); } }