/** * LoteService - Gestión de lotes/terrenos * * CRUD de lotes con soporte multi-tenant. * * @module Construction */ import { Repository } from 'typeorm'; import { Lote } from '../entities/lote.entity'; export interface CreateLoteDto { manzanaId: string; prototipoId?: string; code: string; officialNumber?: string; areaM2?: number; frontM?: number; depthM?: number; status?: string; priceBase?: number; priceFinal?: number; } export interface UpdateLoteDto extends Partial { buyerId?: string; saleDate?: Date; deliveryDate?: Date; } export interface LoteListOptions { tenantId: string; manzanaId?: string; prototipoId?: string; page?: number; limit?: number; search?: string; status?: string; } export declare class LoteService { private readonly repository; constructor(repository: Repository); /** * Listar lotes */ findAll(options: LoteListOptions): Promise<{ items: Lote[]; total: number; }>; /** * Obtener lote por ID */ findById(id: string, tenantId: string): Promise; /** * Obtener lote por código dentro de una manzana */ findByCode(code: string, manzanaId: string, tenantId: string): Promise; /** * Crear lote */ create(tenantId: string, dto: CreateLoteDto, createdBy?: string): Promise; /** * Actualizar lote */ update(id: string, tenantId: string, dto: UpdateLoteDto, updatedBy?: string): Promise; /** * Eliminar lote (soft delete) */ delete(id: string, tenantId: string, _deletedBy?: string): Promise; /** * Obtener lotes por manzana */ findByManzana(manzanaId: string, tenantId: string): Promise; /** * Asignar prototipo a lote */ assignPrototipo(id: string, tenantId: string, prototipoId: string, updatedBy?: string): Promise; /** * Cambiar estado del lote */ changeStatus(id: string, tenantId: string, status: string, updatedBy?: string): Promise; /** * Obtener estadísticas de lotes por estado */ getStatsByStatus(tenantId: string, manzanaId?: string): Promise<{ status: string; count: number; }[]>; } //# sourceMappingURL=lote.service.d.ts.map