feat: normalize and validate component model structure

This commit is contained in:
MatthieuTD
2025-10-01 11:47:45 +02:00
parent f48e7aad30
commit 1a4cedb431
8 changed files with 383 additions and 25 deletions

View File

@@ -9,6 +9,7 @@ import {
} from 'class-validator';
import { Type } from 'class-transformer';
import { ValidateNested } from 'class-validator';
import type { ComponentModelStructure } from '../types/inventory';
export enum CustomFieldType {
TEXT = 'text',
@@ -251,7 +252,7 @@ export class CreateComposantModelDto {
typeComposantId: string;
@IsOptional()
structure?: any;
structure?: ComponentModelStructure;
}
export class UpdateComposantModelDto {
@@ -268,7 +269,7 @@ export class UpdateComposantModelDto {
typeComposantId?: string;
@IsOptional()
structure?: any;
structure?: ComponentModelStructure;
}
export class CreatePieceModelDto {