admin can soft delete listings
This commit is contained in:
@@ -13,6 +13,7 @@ const Feedback = require("./Feedback");
|
||||
|
||||
User.hasMany(Item, { as: "ownedItems", foreignKey: "ownerId" });
|
||||
Item.belongsTo(User, { as: "owner", foreignKey: "ownerId" });
|
||||
Item.belongsTo(User, { as: "deleter", foreignKey: "deletedBy" });
|
||||
|
||||
User.hasMany(Rental, { as: "rentalsAsRenter", foreignKey: "renterId" });
|
||||
User.hasMany(Rental, { as: "rentalsAsOwner", foreignKey: "ownerId" });
|
||||
|
||||
Reference in New Issue
Block a user