feat(site): add document support

This commit is contained in:
Matthieu
2025-09-17 11:40:34 +02:00
parent 7671d4729d
commit 339f46ec24
30 changed files with 1044 additions and 508 deletions

View File

@@ -6,10 +6,10 @@ export declare class ComposantsController {
create(createComposantDto: CreateComposantDto): Promise<{
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -23,6 +23,20 @@ export declare class ComposantsController {
siteId: string;
typeMachineId: string | null;
} | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: {
name: string;
id: string;
@@ -39,10 +53,10 @@ export declare class ComposantsController {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: {
name: string;
@@ -70,19 +84,6 @@ export declare class ComposantsController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
parentComposant: {
name: string;
id: string;
@@ -112,10 +113,10 @@ export declare class ComposantsController {
findAll(): Promise<({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -129,6 +130,20 @@ export declare class ComposantsController {
siteId: string;
typeMachineId: string | null;
} | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -150,9 +165,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -170,10 +185,10 @@ export declare class ComposantsController {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -196,9 +211,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -233,9 +248,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -250,19 +265,6 @@ export declare class ComposantsController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -283,9 +285,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
parentComposant: {
name: string;
@@ -316,10 +318,10 @@ export declare class ComposantsController {
findHierarchy(machineId: string): Promise<({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -342,9 +344,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -362,10 +364,10 @@ export declare class ComposantsController {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -388,9 +390,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -408,10 +410,10 @@ export declare class ComposantsController {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -434,9 +436,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -471,9 +473,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -508,9 +510,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -545,9 +547,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -565,10 +567,10 @@ export declare class ComposantsController {
findByMachine(machineId: string): Promise<({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -582,6 +584,20 @@ export declare class ComposantsController {
siteId: string;
typeMachineId: string | null;
} | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -603,9 +619,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -623,10 +639,10 @@ export declare class ComposantsController {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: {
name: string;
@@ -654,19 +670,6 @@ export declare class ComposantsController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -687,9 +690,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
parentComposant: {
name: string;
@@ -720,10 +723,10 @@ export declare class ComposantsController {
findOne(id: string): Promise<({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -737,6 +740,20 @@ export declare class ComposantsController {
siteId: string;
typeMachineId: string | null;
} | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -758,9 +775,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -778,10 +795,10 @@ export declare class ComposantsController {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -804,9 +821,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -841,9 +858,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -858,19 +875,6 @@ export declare class ComposantsController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -891,9 +895,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
parentComposant: {
name: string;
@@ -924,10 +928,10 @@ export declare class ComposantsController {
update(id: string, updateComposantDto: UpdateComposantDto): Promise<{
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -941,6 +945,20 @@ export declare class ComposantsController {
siteId: string;
typeMachineId: string | null;
} | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -962,9 +980,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -982,10 +1000,10 @@ export declare class ComposantsController {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -1008,9 +1026,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -1045,9 +1063,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -1062,19 +1080,6 @@ export declare class ComposantsController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -1095,9 +1100,9 @@ export declare class ComposantsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
parentComposant: {
name: string;

View File

@@ -6,10 +6,10 @@ export declare class ComposantsService {
create(createComposantDto: CreateComposantDto): Promise<{
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -23,6 +23,20 @@ export declare class ComposantsService {
siteId: string;
typeMachineId: string | null;
} | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: {
name: string;
id: string;
@@ -39,10 +53,10 @@ export declare class ComposantsService {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: {
name: string;
@@ -70,19 +84,6 @@ export declare class ComposantsService {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
parentComposant: {
name: string;
id: string;
@@ -112,10 +113,10 @@ export declare class ComposantsService {
findAll(): Promise<({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -129,6 +130,20 @@ export declare class ComposantsService {
siteId: string;
typeMachineId: string | null;
} | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -150,9 +165,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -170,10 +185,10 @@ export declare class ComposantsService {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -196,9 +211,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -233,9 +248,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -250,19 +265,6 @@ export declare class ComposantsService {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -283,9 +285,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
parentComposant: {
name: string;
@@ -316,10 +318,10 @@ export declare class ComposantsService {
findOne(id: string): Promise<({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -333,6 +335,20 @@ export declare class ComposantsService {
siteId: string;
typeMachineId: string | null;
} | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -354,9 +370,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -374,10 +390,10 @@ export declare class ComposantsService {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -400,9 +416,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -437,9 +453,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -454,19 +470,6 @@ export declare class ComposantsService {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -487,9 +490,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
parentComposant: {
name: string;
@@ -520,10 +523,10 @@ export declare class ComposantsService {
findByMachine(machineId: string): Promise<({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -537,6 +540,20 @@ export declare class ComposantsService {
siteId: string;
typeMachineId: string | null;
} | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -558,9 +575,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -578,10 +595,10 @@ export declare class ComposantsService {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: {
name: string;
@@ -609,19 +626,6 @@ export declare class ComposantsService {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -642,9 +646,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
parentComposant: {
name: string;
@@ -675,10 +679,10 @@ export declare class ComposantsService {
findHierarchy(machineId: string): Promise<({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -701,9 +705,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -721,10 +725,10 @@ export declare class ComposantsService {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -747,9 +751,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -767,10 +771,10 @@ export declare class ComposantsService {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -793,9 +797,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -830,9 +834,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -867,9 +871,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -904,9 +908,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -924,10 +928,10 @@ export declare class ComposantsService {
update(id: string, updateComposantDto: UpdateComposantDto): Promise<{
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -941,6 +945,20 @@ export declare class ComposantsService {
siteId: string;
typeMachineId: string | null;
} | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -962,9 +980,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -982,10 +1000,10 @@ export declare class ComposantsService {
sousComposants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -1008,9 +1026,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -1045,9 +1063,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -1062,19 +1080,6 @@ export declare class ComposantsService {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -1095,9 +1100,9 @@ export declare class ComposantsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
parentComposant: {
name: string;

View File

@@ -23,9 +23,9 @@ export declare class CustomFieldsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
}>;
findCustomFieldValuesByEntity(entityType: string, entityId: string): Promise<({
customField: {
@@ -47,9 +47,9 @@ export declare class CustomFieldsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[]>;
findOneCustomFieldValue(id: string): Promise<({
customField: {
@@ -71,9 +71,9 @@ export declare class CustomFieldsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
}) | null>;
updateCustomFieldValue(id: string, updateCustomFieldValueDto: UpdateCustomFieldValueDto): Promise<{
customField: {
@@ -95,9 +95,9 @@ export declare class CustomFieldsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
}>;
removeCustomFieldValue(id: string): Promise<{
id: string;
@@ -105,9 +105,9 @@ export declare class CustomFieldsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
}>;
upsertCustomFieldValue(body: {
customFieldId: string;
@@ -134,8 +134,8 @@ export declare class CustomFieldsController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
}>;
}

View File

@@ -23,9 +23,9 @@ export declare class CustomFieldsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
}>;
findCustomFieldValuesByEntity(entityType: string, entityId: string): Promise<({
customField: {
@@ -47,9 +47,9 @@ export declare class CustomFieldsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[]>;
findOneCustomFieldValue(id: string): Promise<({
customField: {
@@ -71,9 +71,9 @@ export declare class CustomFieldsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
}) | null>;
updateCustomFieldValue(id: string, updateCustomFieldValueDto: UpdateCustomFieldValueDto): Promise<{
customField: {
@@ -95,9 +95,9 @@ export declare class CustomFieldsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
}>;
removeCustomFieldValue(id: string): Promise<{
id: string;
@@ -105,9 +105,9 @@ export declare class CustomFieldsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
}>;
upsertCustomFieldValue(customFieldId: string, entityType: string, entityId: string, value: string): Promise<{
customField: {
@@ -129,8 +129,8 @@ export declare class CustomFieldsService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
}>;
}

View File

@@ -4,6 +4,17 @@ export declare class DocumentsController {
private readonly documentsService;
constructor(documentsService: DocumentsService);
create(createDocumentDto: CreateDocumentDto): Promise<{
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -47,15 +58,27 @@ export declare class DocumentsController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}>;
findAll(): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -99,15 +122,27 @@ export declare class DocumentsController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
})[]>;
findByMachine(machineId: string): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -151,15 +186,27 @@ export declare class DocumentsController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
})[]>;
findByComposant(composantId: string): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -203,15 +250,27 @@ export declare class DocumentsController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
})[]>;
findByPiece(pieceId: string): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -255,15 +314,91 @@ export declare class DocumentsController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
})[]>;
findBySite(siteId: string): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
constructeur: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
siteId: string;
typeMachineId: string | null;
} | null;
composant: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
constructeur: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
parentComposantId: string | null;
typeComposantId: string | null;
} | null;
piece: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
constructeur: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
} | null;
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
})[]>;
findOne(id: string): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -307,15 +442,27 @@ export declare class DocumentsController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}) | null>;
update(id: string, updateDocumentDto: UpdateDocumentDto): Promise<{
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -359,25 +506,27 @@ export declare class DocumentsController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}>;
remove(id: string): Promise<{
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}>;
}

View File

@@ -36,6 +36,9 @@ let DocumentsController = class DocumentsController {
findByPiece(pieceId) {
return this.documentsService.findByPiece(pieceId);
}
findBySite(siteId) {
return this.documentsService.findBySite(siteId);
}
findOne(id) {
return this.documentsService.findOne(id);
}
@@ -81,6 +84,13 @@ __decorate([
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], DocumentsController.prototype, "findByPiece", null);
__decorate([
(0, common_1.Get)('site/:siteId'),
__param(0, (0, common_1.Param)('siteId')),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], DocumentsController.prototype, "findBySite", null);
__decorate([
(0, common_1.Get)(':id'),
__param(0, (0, common_1.Param)('id')),

View File

@@ -1 +1 @@
{"version":3,"file":"documents.controller.js","sourceRoot":"","sources":["../../src/documents/documents.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAmF;AACnF,2DAAuD;AACvD,6DAAkF;AAG3E,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IACD;IAA7B,YAA6B,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAAG,CAAC;IAGnE,MAAM,CAAS,iBAAoC;QACjD,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACzD,CAAC;IAGD,OAAO;QACL,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;IACzC,CAAC;IAGD,aAAa,CAAqB,SAAiB;QACjD,OAAO,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACxD,CAAC;IAGD,eAAe,CAAuB,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@@ -4,6 +4,17 @@ export declare class DocumentsService {
private prisma;
constructor(prisma: PrismaService);
create(createDocumentDto: CreateDocumentDto): Promise<{
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -47,15 +58,27 @@ export declare class DocumentsService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}>;
findAll(): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -99,15 +122,27 @@ export declare class DocumentsService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
})[]>;
findOne(id: string): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -151,15 +186,27 @@ export declare class DocumentsService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}) | null>;
findByMachine(machineId: string): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -203,15 +250,27 @@ export declare class DocumentsService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
})[]>;
findByComposant(composantId: string): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -255,15 +314,27 @@ export declare class DocumentsService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
})[]>;
findByPiece(pieceId: string): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -307,15 +378,91 @@ export declare class DocumentsService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
})[]>;
findBySite(siteId: string): Promise<({
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
constructeur: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
siteId: string;
typeMachineId: string | null;
} | null;
composant: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
constructeur: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
parentComposantId: string | null;
typeComposantId: string | null;
} | null;
piece: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
constructeur: string | null;
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
composantId: string | null;
typePieceId: string | null;
} | null;
} & {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
})[]>;
update(id: string, updateDocumentDto: UpdateDocumentDto): Promise<{
site: {
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
} | null;
machine: {
name: string;
id: string;
@@ -359,25 +506,27 @@ export declare class DocumentsService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}>;
remove(id: string): Promise<{
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}>;
}

View File

@@ -24,6 +24,7 @@ let DocumentsService = class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -33,6 +34,7 @@ let DocumentsService = class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -43,6 +45,7 @@ let DocumentsService = class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -53,6 +56,7 @@ let DocumentsService = class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -63,6 +67,7 @@ let DocumentsService = class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -73,6 +78,18 @@ let DocumentsService = class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
async findBySite(siteId) {
return this.prisma.document.findMany({
where: { siteId },
include: {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -84,6 +101,7 @@ let DocumentsService = class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}

View File

@@ -1 +1 @@
{"version":3,"file":"documents.service.js","sourceRoot":"","sources":["../../src/documents/documents.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6DAAyD;AAIlD,IAAM,gBAAg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AAE,IAAI;gBACb,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,IAAI;aACZ;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAe;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;YACnC,KAAK,EAAE,EAAE,OAAO,EAAE;YAClB,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,IAAI;aACZ;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,iBAAoC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;YACjC,KAAK,EAAE,EAAE,EAAE,EAAE;YACb,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,IAAI;aACZ;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;YACjC,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AArFY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAEiB,8BAAa;GAD9B,gBAAgB,CAqF5B"}
{"version":3,"file":"documents.service.js","sourceRoot":"","sources":["../../src/documents/documents.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6DAAyD;AAIlD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACP;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C,KAAK,CAAC,MAAM,CAAC,iBAAoC;QAC/C,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,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achineDto): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -27,10 +31,10 @@ export declare class MachinesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -38,6 +42,20 @@ export declare class MachinesController {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -59,9 +77,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -79,10 +97,10 @@ export declare class MachinesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -105,9 +123,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -148,19 +166,6 @@ export declare class MachinesController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -181,9 +186,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -200,7 +205,11 @@ export declare class MachinesController {
findAll(): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -221,10 +230,10 @@ export declare class MachinesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -232,6 +241,20 @@ export declare class MachinesController {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -253,9 +276,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -273,10 +296,10 @@ export declare class MachinesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -299,9 +322,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -349,9 +372,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -366,19 +389,6 @@ export declare class MachinesController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -399,9 +409,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -418,7 +428,11 @@ export declare class MachinesController {
findOne(id: string): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -439,10 +453,10 @@ export declare class MachinesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -450,6 +464,20 @@ export declare class MachinesController {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -471,9 +499,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -491,10 +519,10 @@ export declare class MachinesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -517,9 +545,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -567,9 +595,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -584,19 +612,6 @@ export declare class MachinesController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -617,9 +632,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -636,7 +651,11 @@ export declare class MachinesController {
update(id: string, updateMachineDto: UpdateMachineDto): Promise<{
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -657,10 +676,10 @@ export declare class MachinesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -668,6 +687,20 @@ export declare class MachinesController {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: {
name: string;
id: string;
@@ -684,10 +717,10 @@ export declare class MachinesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: {
name: string;
@@ -728,19 +761,6 @@ export declare class MachinesController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -761,9 +781,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -792,7 +812,11 @@ export declare class MachinesController {
addMissingCustomFields(id: string): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -813,10 +837,10 @@ export declare class MachinesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -824,6 +848,20 @@ export declare class MachinesController {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -845,9 +883,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -865,10 +903,10 @@ export declare class MachinesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -891,9 +929,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -941,9 +979,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -958,19 +996,6 @@ export declare class MachinesController {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -991,9 +1016,9 @@ export declare class MachinesController {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;

View File

@@ -6,7 +6,11 @@ export declare class MachinesService {
create(createMachineDto: CreateMachineDto): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -27,10 +31,10 @@ export declare class MachinesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -38,6 +42,20 @@ export declare class MachinesService {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -59,9 +77,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -79,10 +97,10 @@ export declare class MachinesService {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -105,9 +123,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -148,19 +166,6 @@ export declare class MachinesService {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -181,9 +186,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -203,7 +208,11 @@ export declare class MachinesService {
findAll(): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -224,10 +233,10 @@ export declare class MachinesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -235,6 +244,20 @@ export declare class MachinesService {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -256,9 +279,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -276,10 +299,10 @@ export declare class MachinesService {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -302,9 +325,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -352,9 +375,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -369,19 +392,6 @@ export declare class MachinesService {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -402,9 +412,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -421,7 +431,11 @@ export declare class MachinesService {
findOne(id: string): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -442,10 +456,10 @@ export declare class MachinesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -453,6 +467,20 @@ export declare class MachinesService {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -474,9 +502,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -494,10 +522,10 @@ export declare class MachinesService {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -520,9 +548,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -570,9 +598,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -587,19 +615,6 @@ export declare class MachinesService {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -620,9 +635,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -639,7 +654,11 @@ export declare class MachinesService {
update(id: string, updateMachineDto: UpdateMachineDto): Promise<{
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -660,10 +679,10 @@ export declare class MachinesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -671,6 +690,20 @@ export declare class MachinesService {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: {
name: string;
id: string;
@@ -687,10 +720,10 @@ export declare class MachinesService {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: {
name: string;
@@ -731,19 +764,6 @@ export declare class MachinesService {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -764,9 +784,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -795,7 +815,11 @@ export declare class MachinesService {
addMissingCustomFields(machineId: string): Promise<({
site: {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -816,10 +840,10 @@ export declare class MachinesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -827,6 +851,20 @@ export declare class MachinesService {
machinePieces: import("@prisma/client/runtime/library").JsonValue | null;
specifications: import("@prisma/client/runtime/library").JsonValue | null;
}) | null;
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
pieces: ({
customFieldValues: ({
customField: {
@@ -848,9 +886,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -868,10 +906,10 @@ export declare class MachinesService {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: ({
customFieldValues: ({
@@ -894,9 +932,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -944,9 +982,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;
@@ -961,19 +999,6 @@ export declare class MachinesService {
parentComposantId: string | null;
typeComposantId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
}[];
customFieldValues: ({
customField: {
name: string;
@@ -994,9 +1019,9 @@ export declare class MachinesService {
updatedAt: Date;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
value: string;
customFieldId: string;
pieceId: string | null;
})[];
} & {
name: string;

View File

@@ -6,10 +6,10 @@ export declare class PiecesController {
create(createPieceDto: CreatePieceDto): Promise<{
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -41,13 +41,14 @@ export declare class PiecesController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
@@ -65,10 +66,10 @@ export declare class PiecesController {
findAll(): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -100,13 +101,14 @@ export declare class PiecesController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
@@ -124,10 +126,10 @@ export declare class PiecesController {
findByMachine(machineId: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -159,13 +161,14 @@ export declare class PiecesController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
@@ -183,10 +186,10 @@ export declare class PiecesController {
findByComposant(composantId: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -218,13 +221,14 @@ export declare class PiecesController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
@@ -242,10 +246,10 @@ export declare class PiecesController {
findOne(id: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -277,13 +281,14 @@ export declare class PiecesController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
@@ -301,10 +306,10 @@ export declare class PiecesController {
update(id: string, updatePieceDto: UpdatePieceDto): Promise<{
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -336,13 +341,14 @@ export declare class PiecesController {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;

View File

@@ -6,10 +6,10 @@ export declare class PiecesService {
create(createPieceDto: CreatePieceDto): Promise<{
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -41,13 +41,14 @@ export declare class PiecesService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
@@ -65,10 +66,10 @@ export declare class PiecesService {
findAll(): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -100,13 +101,14 @@ export declare class PiecesService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
@@ -124,10 +126,10 @@ export declare class PiecesService {
findOne(id: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -159,13 +161,14 @@ export declare class PiecesService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
@@ -183,10 +186,10 @@ export declare class PiecesService {
findByMachine(machineId: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -218,13 +221,14 @@ export declare class PiecesService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
@@ -242,10 +246,10 @@ export declare class PiecesService {
findByComposant(composantId: string): Promise<({
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -277,13 +281,14 @@ export declare class PiecesService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
@@ -301,10 +306,10 @@ export declare class PiecesService {
update(id: string, updatePieceDto: UpdatePieceDto): Promise<{
typePiece: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
machine: {
name: string;
@@ -336,13 +341,14 @@ export declare class PiecesService {
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
pieceId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;

View File

@@ -7,6 +7,7 @@ export declare class CreateDocumentDto {
machineId?: string;
composantId?: string;
pieceId?: string;
siteId?: string;
}
export declare class UpdateDocumentDto {
name?: string;
@@ -14,4 +15,5 @@ export declare class UpdateDocumentDto {
path?: string;
mimeType?: string;
size?: number;
siteId?: string;
}

View File

@@ -20,6 +20,7 @@ class CreateDocumentDto {
machineId;
composantId;
pieceId;
siteId;
}
exports.CreateDocumentDto = CreateDocumentDto;
__decorate([
@@ -57,12 +58,18 @@ __decorate([
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], CreateDocumentDto.prototype, "pieceId", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], CreateDocumentDto.prototype, "siteId", void 0);
class UpdateDocumentDto {
name;
filename;
path;
mimeType;
size;
siteId;
}
exports.UpdateDocumentDto = UpdateDocumentDto;
__decorate([
@@ -90,4 +97,9 @@ __decorate([
(0, class_validator_1.IsNumber)(),
__metadata("design:type", Number)
], UpdateDocumentDto.prototype, "size", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], UpdateDocumentDto.prototype, "siteId", void 0);
//# sourceMappingURL=document.dto.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"document.dto.js","sourceRoot":"","sources":["../../../src/shared/dto/document.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AAEjE,MAAa,iBAAiB;IAE5B,IAAI,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AS;IAIb,SAAS,CAAU;IAInB,WAAW,CAAU;IAIrB,OAAO,CAAU;IAIjB,MAAM,CAAU;CACjB;AA/BD,8CA+BC;AA7BC;IADC,IAAA,0BAAQ,GAAE;;+CACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;mDACM;AAGjB;IADC,IAAA,0BAAQ,GAAE;;+CACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;mDACM;AAGjB;IADC,IAAA,0BAAQ,GAAE;;+CACE;AAIb;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oDACQ;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;sDACU;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kDACM;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iDACK;AAGlB,MAAa,iBAAiB;IAG5B,IAAI,CAAU;IAId,QAAQ,CAAU;IAIlB,IAAI,CAAU;IAId,QAAQ,CAAU;IAIlB,IAAI,CAAU;IAId,MAAM,CAAU;CACjB;AAxBD,8CAwBC;AArBC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+CACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+CACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACO;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+CACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iDACK"}

View File

@@ -5,7 +5,11 @@ export declare class SitesController {
constructor(sitesService: SitesService);
create(createSiteDto: CreateSiteDto): Promise<{
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -14,10 +18,10 @@ export declare class SitesController {
machines: ({
typeMachine: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -41,10 +45,10 @@ export declare class SitesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: {
name: string;
@@ -97,9 +101,27 @@ export declare class SitesController {
siteId: string;
typeMachineId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
@@ -108,10 +130,10 @@ export declare class SitesController {
machines: ({
typeMachine: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -135,10 +157,10 @@ export declare class SitesController {
composants: ({
typeComposant: {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: {
name: string;
@@ -191,23 +213,49 @@ export declare class SitesController {
siteId: string;
typeMachineId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
}) | null>;
update(id: string, updateSiteDto: UpdateSiteDto): Promise<{
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
}>;
remove(id: string): Promise<{
name: string;
description: string | null;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;

View File

@@ -4,21 +4,21 @@ export declare class SitesService {
private prisma;
constructor(prisma: PrismaService);
create(createSiteDto: CreateSiteDto): Promise<{
id: string;
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
}>;
findAll(): Promise<({
machines: ({
typeMachine: {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
@@ -30,8 +30,8 @@ export declare class SitesService {
specifications: import("@prisma/client/runtime/library").JsonValue | null;
} | null;
pieces: {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
@@ -44,15 +44,15 @@ export declare class SitesService {
}[];
composants: ({
typeComposant: {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
@@ -64,8 +64,8 @@ export declare class SitesService {
typePieceId: string | null;
}[];
sousComposants: {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
@@ -73,12 +73,12 @@ export declare class SitesService {
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
typeComposantId: string | null;
}[];
} & {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
@@ -86,12 +86,12 @@ export declare class SitesService {
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
typeComposantId: string | null;
})[];
} & {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
@@ -101,22 +101,36 @@ export declare class SitesService {
siteId: string;
typeMachineId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
id: string;
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
})[]>;
findOne(id: string): Promise<({
machines: ({
typeMachine: {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
@@ -128,8 +142,8 @@ export declare class SitesService {
specifications: import("@prisma/client/runtime/library").JsonValue | null;
} | null;
pieces: {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
@@ -142,15 +156,15 @@ export declare class SitesService {
}[];
composants: ({
typeComposant: {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
} | null;
pieces: {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
@@ -162,8 +176,8 @@ export declare class SitesService {
typePieceId: string | null;
}[];
sousComposants: {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
@@ -171,12 +185,12 @@ export declare class SitesService {
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
typeComposantId: string | null;
}[];
} & {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
@@ -184,12 +198,12 @@ export declare class SitesService {
prix: import("@prisma/client/runtime/library").Decimal | null;
emplacement: string | null;
machineId: string | null;
typeComposantId: string | null;
parentComposantId: string | null;
typeComposantId: string | null;
})[];
} & {
id: string;
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
reference: string | null;
@@ -199,36 +213,50 @@ export declare class SitesService {
siteId: string;
typeMachineId: string | null;
})[];
documents: {
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
siteId: string | null;
machineId: string | null;
composantId: string | null;
filename: string;
path: string;
mimeType: string;
size: number;
pieceId: string | null;
}[];
} & {
id: string;
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
}) | null>;
update(id: string, updateSiteDto: UpdateSiteDto): Promise<{
id: string;
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
}>;
remove(id: string): Promise<{
id: string;
name: string;
contactName: string;
contactPhone: string;
contactAddress: string;
contactPostalCode: string;
contactCity: string;
id: string;
createdAt: Date;
updatedAt: Date;
}>;

View File

@@ -38,6 +38,7 @@ let SitesService = class SitesService {
pieces: true,
},
},
documents: true,
},
});
}
@@ -58,6 +59,7 @@ let SitesService = class SitesService {
pieces: true,
},
},
documents: true,
},
});
}

View File

@@ -1 +1 @@
{"version":3,"file":"sites.service.js","sourceRoot":"","sources":["../../src/sites/sites.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6DAAyD;AAIlD,IAAM,YAAY,GAAlB,MAAM,YAAY;IACH;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C,KAAK,CAAC,MAAM,CAAC,aAA4B;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YAC7B,IAAI,EAAE,aAAa;SACpB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC/B,OAAO,EAAE;gBACP,QAAQ,EAAE;oBACR,OAAO,EAAE;wBACP,WAAW,EAAE,IAAI;wBACjB,UAAU,EAAE;4BACV,OAAO,EAAE;gCACP,aAAa,EAAE,IAAI;gCACnB,cAAc,EAAE,IAAI;gCACpB,M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1E,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YAC7B,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA5EY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEiB,8BAAa;GAD9B,YAAY,CA4ExB"}
{"version":3,"file":"sites.service.js","sourceRoot":"","sources":["../../src/sites/sites.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6DAAyD;AAIlD,IAAM,YAAY,GAAlB,MAAM,YAAY;IACH;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C,KAAK,CAAC,MAAM,CAAC,aAA4B;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YAC7B,IAAI,EAAE,aAAa;SACpB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC/B,OAAO,EAAE;gBACP,QAAQ,EAAE;oBACR,OAAO,EAAE;wBACP,WAAW,EAAE,IAAI;wBACjB,UAAU,EAAE;4BACV,OAAO,EAAE;gCACP,aAAa,EAAE,IAAI;gCACnB,cAAc,EAAE,IAAI;gCACpB,MAAM,EAAE,IAAI;6BACb;yBACF;wBACD,MAAM,EAAE,IAAI;qBACb;iBACF;gBACD,SAAS,EAAE,IAAI;aAChB;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;YACjC,KAAK,EAAE,EAAE,EAAE,EAAE;YACb,OAAO,EAAE;gBACP,QAAQ,EAAE;oBACR,OAAO,EAAE;wBACP,WAAW,EAAE,IAAI;wBACjB,UAAU,EAAE;4BACV,OAAO,EAAE;gCACP,aAAa,EAAE,IAAI;gCACnB,cAAc,EAAE,IAAI;gCACpB,MAAM,EAAE,IAAI;6BACb;yBACF;wBACD,MAAM,EAAE,IAAI;qBACb;iBACF;gBACD,SAAS,EAAE,IAAI;aAChB;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,aAA4B;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YAC7B,KAAK,EAAE,EAAE,EAAE,EAAE;YACb,IAAI,EAAE,aAAa;SACpB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QAErB,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;YACxD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACrB,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;QAEH,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAM,YAAY,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAChE,MAAM,IAAI,KAAK,CACb,mDAAmD,cAAc,CAAC,MAAM,gBAAgB,YAAY,IAAI;gBACxG,yEAAyE,CAC1E,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YAC7B,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA9EY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEiB,8BAAa;GAD9B,YAAY,CA8ExB"}

File diff suppressed because one or more lines are too long

View File

@@ -19,10 +19,10 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -58,10 +58,10 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -97,10 +97,10 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -124,10 +124,10 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -137,10 +137,10 @@ export declare class TypesController {
}>;
removeTypeMachine(id: string): Promise<{
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -164,10 +164,10 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
findAllTypeComposants(): Promise<({
composants: {
@@ -198,10 +198,10 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
})[]>;
findOneTypeComposant(id: string): Promise<({
composants: {
@@ -232,10 +232,10 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}) | null>;
updateTypeComposant(id: string, updateTypeComposantDto: UpdateTypeComposantDto): Promise<{
customFields: {
@@ -253,17 +253,17 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
removeTypeComposant(id: string): Promise<{
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
createTypePiece(createTypePieceDto: CreateTypePieceDto): Promise<{
customFields: {
@@ -281,10 +281,10 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
findAllTypePieces(): Promise<({
pieces: {
@@ -315,10 +315,10 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
})[]>;
findOneTypePiece(id: string): Promise<({
pieces: {
@@ -349,10 +349,10 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}) | null>;
updateTypePiece(id: string, updateTypePieceDto: UpdateTypePieceDto): Promise<{
customFields: {
@@ -370,16 +370,16 @@ export declare class TypesController {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
removeTypePiece(id: string): Promise<{
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
}

View File

@@ -19,10 +19,10 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -58,10 +58,10 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -97,10 +97,10 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -124,10 +124,10 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -137,10 +137,10 @@ export declare class TypesService {
}>;
removeTypeMachine(id: string): Promise<{
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
category: string | null;
maintenanceFrequency: string | null;
components: import("@prisma/client/runtime/library").JsonValue | null;
@@ -164,10 +164,10 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
findAllTypeComposants(): Promise<({
composants: {
@@ -198,10 +198,10 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
})[]>;
findOneTypeComposant(id: string): Promise<({
composants: {
@@ -232,10 +232,10 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}) | null>;
updateTypeComposant(id: string, updateTypeComposantDto: UpdateTypeComposantDto): Promise<{
customFields: {
@@ -253,17 +253,17 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
removeTypeComposant(id: string): Promise<{
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
createTypePiece(createTypePieceDto: CreateTypePieceDto): Promise<{
customFields: {
@@ -281,10 +281,10 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
findAllTypePieces(): Promise<({
pieces: {
@@ -315,10 +315,10 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
})[]>;
findOneTypePiece(id: string): Promise<({
pieces: {
@@ -349,10 +349,10 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}) | null>;
updateTypePiece(id: string, updateTypePieceDto: UpdateTypePieceDto): Promise<{
customFields: {
@@ -370,16 +370,16 @@ export declare class TypesService {
}[];
} & {
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
removeTypePiece(id: string): Promise<{
name: string;
description: string | null;
id: string;
createdAt: Date;
updatedAt: Date;
description: string | null;
}>;
}

View File

@@ -0,0 +1,8 @@
-- Add optional site relation to documents
ALTER TABLE "documents"
ADD COLUMN "siteId" TEXT;
ALTER TABLE "documents"
ADD CONSTRAINT "documents_siteId_fkey"
FOREIGN KEY ("siteId") REFERENCES "sites"("id")
ON DELETE CASCADE ON UPDATE CASCADE;

View File

@@ -24,6 +24,7 @@ model Site {
// Relations
machines Machine[]
documents Document[] @relation("SiteDocuments")
@@map("sites")
}
@@ -175,6 +176,9 @@ model Document {
pieceId String?
piece Piece? @relation("PieceDocuments", fields: [pieceId], references: [id], onDelete: Cascade)
siteId String?
site Site? @relation("SiteDocuments", fields: [siteId], references: [id], onDelete: Cascade)
@@map("documents")
}

View File

@@ -31,6 +31,11 @@ export class DocumentsController {
return this.documentsService.findByPiece(pieceId);
}
@Get('site/:siteId')
findBySite(@Param('siteId') siteId: string) {
return this.documentsService.findBySite(siteId);
}
@Get(':id')
findOne(@Param('id') id: string) {
return this.documentsService.findOne(id);

View File

@@ -13,6 +13,7 @@ export class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -23,6 +24,7 @@ export class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -34,6 +36,7 @@ export class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -45,6 +48,7 @@ export class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -56,6 +60,7 @@ export class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -67,6 +72,19 @@ export class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
async findBySite(siteId: string) {
return this.prisma.document.findMany({
where: { siteId },
include: {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}
@@ -79,6 +97,7 @@ export class DocumentsService {
machine: true,
composant: true,
piece: true,
site: true,
},
});
}

View File

@@ -27,6 +27,10 @@ export class CreateDocumentDto {
@IsOptional()
@IsString()
pieceId?: string;
@IsOptional()
@IsString()
siteId?: string;
}
export class UpdateDocumentDto {
@@ -49,4 +53,8 @@ export class UpdateDocumentDto {
@IsOptional()
@IsNumber()
size?: number;
}
@IsOptional()
@IsString()
siteId?: string;
}

View File

@@ -28,6 +28,7 @@ export class SitesService {
pieces: true,
},
},
documents: true,
},
});
}
@@ -49,6 +50,7 @@ export class SitesService {
pieces: true,
},
},
documents: true,
},
});
}