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>
92 lines
4.3 KiB
JavaScript
92 lines
4.3 KiB
JavaScript
"use strict";
|
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
};
|
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.StockQueryDto = exports.AdjustStockDto = exports.CreateMovementDto = void 0;
|
|
const swagger_1 = require("@nestjs/swagger");
|
|
const class_validator_1 = require("class-validator");
|
|
const inventory_movement_entity_1 = require("../entities/inventory-movement.entity");
|
|
class CreateMovementDto {
|
|
}
|
|
exports.CreateMovementDto = CreateMovementDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'ID del producto' }),
|
|
(0, class_validator_1.IsUUID)(),
|
|
__metadata("design:type", String)
|
|
], CreateMovementDto.prototype, "productId", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ enum: inventory_movement_entity_1.MovementType, description: 'Tipo de movimiento' }),
|
|
(0, class_validator_1.IsEnum)(inventory_movement_entity_1.MovementType),
|
|
__metadata("design:type", String)
|
|
], CreateMovementDto.prototype, "movementType", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'Cantidad (positiva para entrada, negativa para salida)', example: 10 }),
|
|
(0, class_validator_1.IsNumber)(),
|
|
__metadata("design:type", Number)
|
|
], CreateMovementDto.prototype, "quantity", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Costo unitario', example: 15.5 }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsNumber)(),
|
|
(0, class_validator_1.Min)(0),
|
|
__metadata("design:type", Number)
|
|
], CreateMovementDto.prototype, "unitCost", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Tipo de referencia (sale, purchase, etc.)' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], CreateMovementDto.prototype, "referenceType", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'ID de referencia' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsUUID)(),
|
|
__metadata("design:type", String)
|
|
], CreateMovementDto.prototype, "referenceId", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Notas' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], CreateMovementDto.prototype, "notes", void 0);
|
|
class AdjustStockDto {
|
|
}
|
|
exports.AdjustStockDto = AdjustStockDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'ID del producto' }),
|
|
(0, class_validator_1.IsUUID)(),
|
|
__metadata("design:type", String)
|
|
], AdjustStockDto.prototype, "productId", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'Nueva cantidad en stock', example: 50 }),
|
|
(0, class_validator_1.IsNumber)(),
|
|
(0, class_validator_1.Min)(0),
|
|
__metadata("design:type", Number)
|
|
], AdjustStockDto.prototype, "newQuantity", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Razón del ajuste' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], AdjustStockDto.prototype, "reason", void 0);
|
|
class StockQueryDto {
|
|
}
|
|
exports.StockQueryDto = StockQueryDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Solo productos con bajo stock' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Boolean)
|
|
], StockQueryDto.prototype, "lowStock", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Solo productos sin stock' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Boolean)
|
|
], StockQueryDto.prototype, "outOfStock", void 0);
|
|
//# sourceMappingURL=inventory.dto.js.map
|