fix: fix mapping

This commit is contained in:
2026-02-17 20:58:58 -03:00
parent 63679b5087
commit 2d4805228a

View File

@@ -11,11 +11,11 @@ export class ProductDAO extends BaseDAO<Product, DBProduct, DBProduct> {
super(Product.name); super(Product.name);
} }
protected override toDB(model: Product): DBProduct { protected override toDB(model: Product) {
return new Product(model.barcode, model.name, model.image, model.id); return new DBProduct(model.barcode, model.name, model.image, model.id);
} }
protected override fromDB(qR: DBProduct): Product { protected override fromDB(qR: DBProduct) {
return new DBProduct(qR.barcode, qR.name, qR.image, qR.id); return new Product(qR.barcode, qR.name, qR.image, qR.id);
} }
} }