feat(constructeurs): introduce constructors management
This commit is contained in:
@@ -19,7 +19,7 @@ export class CreateComposantDto {
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@Transform(({ value }) => value === '' ? null : value)
|
||||
@@ -46,7 +46,7 @@ export class UpdateComposantDto {
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@Transform(({ value }) => value === '' ? null : value)
|
||||
|
||||
28
src/shared/dto/constructeur.dto.ts
Normal file
28
src/shared/dto/constructeur.dto.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { IsEmail, IsOptional, IsString } from 'class-validator'
|
||||
|
||||
export class CreateConstructeurDto {
|
||||
@IsString()
|
||||
name: string
|
||||
|
||||
@IsOptional()
|
||||
@IsEmail()
|
||||
email?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
phone?: string
|
||||
}
|
||||
|
||||
export class UpdateConstructeurDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
name?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsEmail()
|
||||
email?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
phone?: string
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IsString, IsOptional, IsNumber, IsDecimal } from 'class-validator';
|
||||
import { IsString, IsOptional, IsDecimal } from 'class-validator';
|
||||
|
||||
export class CreateMachineDto {
|
||||
@IsString()
|
||||
@@ -13,7 +13,7 @@ export class CreateMachineDto {
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsDecimal()
|
||||
@@ -39,7 +39,7 @@ export class UpdateMachineDto {
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsDecimal()
|
||||
|
||||
@@ -19,7 +19,7 @@ export class CreatePieceDto {
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@Transform(({ value }) => value === '' ? null : value)
|
||||
@@ -46,7 +46,7 @@ export class UpdatePieceDto {
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
constructeur?: string;
|
||||
constructeurId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@Transform(({ value }) => value === '' ? null : value)
|
||||
|
||||
Reference in New Issue
Block a user