michangarrito/apps/backend/dist/modules/orders/orders.service.d.ts
rckrdmrd 48dea7a5d0 feat: Initial commit - michangarrito
Marketplace móvil para negocios locales mexicanos.

Estructura inicial:
- apps/backend (NestJS API)
- apps/frontend (React Web)
- apps/mobile (Expo/React Native)
- apps/mcp-server (Claude MCP Server)
- apps/whatsapp-service (WhatsApp Business API)
- database/ (PostgreSQL DDL)
- docs/ (Documentación)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:41:02 -06:00

27 lines
1.2 KiB
TypeScript

import { Repository } from 'typeorm';
import { Order, OrderStatus } from './entities/order.entity';
import { OrderItem } from './entities/order-item.entity';
import { CreateOrderDto, UpdateOrderStatusDto } from './dto/order.dto';
export declare class OrdersService {
private readonly orderRepo;
private readonly orderItemRepo;
constructor(orderRepo: Repository<Order>, orderItemRepo: Repository<OrderItem>);
private generateOrderNumber;
create(tenantId: string, dto: CreateOrderDto): Promise<Order>;
findAll(tenantId: string, status?: OrderStatus): Promise<Order[]>;
findOne(tenantId: string, id: string): Promise<Order>;
findByOrderNumber(tenantId: string, orderNumber: string): Promise<Order>;
getActiveOrders(tenantId: string): Promise<Order[]>;
getTodayOrders(tenantId: string): Promise<Order[]>;
updateStatus(tenantId: string, id: string, dto: UpdateOrderStatusDto): Promise<Order>;
private validateStatusTransition;
getOrderStats(tenantId: string): Promise<{
todayOrders: number;
todaySales: number;
pending: number;
preparing: number;
ready: number;
activeTotal: number;
}>;
}