260316:1117 20260316:1100 Refactor UUID
Build and Deploy / deploy (push) Successful in 9m24s

This commit is contained in:
admin
2026-03-16 11:17:15 +07:00
parent b93cd91325
commit c5c3ed9016
92 changed files with 1726 additions and 620 deletions
@@ -289,6 +289,28 @@ export class ShopDrawingService {
return shopDrawing;
}
async findOneByUuid(uuid: string) {
const shopDrawing = await this.shopDrawingRepo.findOne({
where: { uuid },
relations: [
'mainCategory',
'subCategory',
'revisions',
'revisions.attachments',
'revisions.contractDrawings',
],
order: {
revisions: { revisionNumber: 'DESC' },
},
});
if (!shopDrawing) {
throw new NotFoundException(`Shop Drawing UUID ${uuid} not found`);
}
return shopDrawing;
}
/**
* ลบ Shop Drawing
*/