fix: fix mapping
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user