Tech
El patrón Criteria en NestJS: lo que un cliente puede pedir es un archivo, no una firma
Cinco parámetros y un find()
El ejemplo de todo el artículo es el catálogo de una biblioteca. Un libro guarda esto:
// src/book/book.schema.ts
@ Schema ({ timestamps : true })
export class Book {
@ Prop () title : string ;
@ Prop ({ type : Types . ObjectId , ref : " Author " }) author : Types . ObjectId ;
@ Prop () publishedAt : Date ;
@ Prop () copies : number ; // ejemplares en la estantería ...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to