Support beforeDelete and afterDelete