feat: normalize and validate component model structure
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user