/** * ConceptoService - Catalogo de Conceptos de Obra * * Gestiona el catálogo jerárquico de conceptos de obra. * Los conceptos pueden tener estructura padre-hijo (niveles). * * @module Budgets */ import { Repository } from 'typeorm'; import { BaseService, ServiceContext, PaginatedResult } from '../../../shared/services/base.service'; import { Concepto } from '../entities/concepto.entity'; export interface CreateConceptoDto { code: string; name: string; description?: string; parentId?: string; unitId?: string; unitPrice?: number; isComposite?: boolean; } export interface UpdateConceptoDto { name?: string; description?: string; unitId?: string; unitPrice?: number; isComposite?: boolean; } export declare class ConceptoService extends BaseService { constructor(repository: Repository); /** * Crear un nuevo concepto con cálculo automático de nivel y path */ createConcepto(ctx: ServiceContext, data: CreateConceptoDto): Promise; /** * Obtener conceptos raíz (sin padre) */ findRootConceptos(ctx: ServiceContext, page?: number, limit?: number): Promise>; /** * Obtener hijos de un concepto */ findChildren(ctx: ServiceContext, parentId: string): Promise; /** * Obtener árbol completo de conceptos */ getConceptoTree(ctx: ServiceContext, rootId?: string): Promise; private buildTree; /** * Buscar conceptos por código o nombre */ search(ctx: ServiceContext, term: string, limit?: number): Promise; /** * Verificar si un código ya existe */ codeExists(ctx: ServiceContext, code: string): Promise; } interface ConceptoNode extends Concepto { children: ConceptoNode[]; } export {}; //# sourceMappingURL=concepto.service.d.ts.map