- Backend NestJS con módulos de autenticación, inventario, créditos - Frontend React con dashboard y componentes UI - Base de datos PostgreSQL con migraciones - Tests E2E configurados - Configuración de Docker y deployment Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
83 lines
1.4 KiB
TypeScript
83 lines
1.4 KiB
TypeScript
import {
|
|
IsString,
|
|
IsNumber,
|
|
IsOptional,
|
|
Min,
|
|
MaxLength,
|
|
} from 'class-validator';
|
|
import { ApiPropertyOptional } from '@nestjs/swagger';
|
|
|
|
export class UpdateInventoryItemDto {
|
|
@ApiPropertyOptional({
|
|
description: 'Nombre del producto',
|
|
example: 'Coca Cola 600ml',
|
|
})
|
|
@IsString()
|
|
@IsOptional()
|
|
@MaxLength(255)
|
|
name?: string;
|
|
|
|
@ApiPropertyOptional({
|
|
description: 'Cantidad en stock',
|
|
example: 24,
|
|
})
|
|
@IsNumber()
|
|
@IsOptional()
|
|
@Min(0)
|
|
quantity?: number;
|
|
|
|
@ApiPropertyOptional({
|
|
description: 'Categoria',
|
|
example: 'Bebidas',
|
|
})
|
|
@IsString()
|
|
@IsOptional()
|
|
@MaxLength(100)
|
|
category?: string;
|
|
|
|
@ApiPropertyOptional({
|
|
description: 'Subcategoria',
|
|
example: 'Refrescos',
|
|
})
|
|
@IsString()
|
|
@IsOptional()
|
|
@MaxLength(100)
|
|
subcategory?: string;
|
|
|
|
@ApiPropertyOptional({
|
|
description: 'Codigo de barras',
|
|
example: '7501055303045',
|
|
})
|
|
@IsString()
|
|
@IsOptional()
|
|
@MaxLength(50)
|
|
barcode?: string;
|
|
|
|
@ApiPropertyOptional({
|
|
description: 'Stock minimo para alerta',
|
|
example: 5,
|
|
})
|
|
@IsNumber()
|
|
@IsOptional()
|
|
@Min(0)
|
|
minStock?: number;
|
|
|
|
@ApiPropertyOptional({
|
|
description: 'Precio de venta',
|
|
example: 18.5,
|
|
})
|
|
@IsNumber()
|
|
@IsOptional()
|
|
@Min(0)
|
|
price?: number;
|
|
|
|
@ApiPropertyOptional({
|
|
description: 'Costo',
|
|
example: 12.0,
|
|
})
|
|
@IsNumber()
|
|
@IsOptional()
|
|
@Min(0)
|
|
cost?: number;
|
|
}
|