{"id":21320445,"url":"https://github.com/eclass/sequelize-soft-delete","last_synced_at":"2025-07-12T04:32:51.932Z","repository":{"id":32397220,"uuid":"132491977","full_name":"eclass/sequelize-soft-delete","owner":"eclass","description":"Sequelize model plugin for add soft-delete method","archived":false,"fork":false,"pushed_at":"2024-11-06T20:09:05.000Z","size":699,"stargazers_count":2,"open_issues_count":51,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-17T05:05:00.010Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclass.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-07T17:06:46.000Z","updated_at":"2021-02-11T17:31:50.000Z","dependencies_parsed_at":"2023-12-22T22:21:44.427Z","dependency_job_id":"f3b2d0c2-45f5-4bb7-a852-608c42fde176","html_url":"https://github.com/eclass/sequelize-soft-delete","commit_stats":{"total_commits":174,"total_committers":4,"mean_commits":43.5,"dds":"0.10919540229885061","last_synced_commit":"99160dc5a052fc3efc70195a7e53d01eaf0bb151"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclass%2Fsequelize-soft-delete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclass%2Fsequelize-soft-delete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclass%2Fsequelize-soft-delete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclass%2Fsequelize-soft-delete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclass","download_url":"https://codeload.github.com/eclass/sequelize-soft-delete/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225795392,"owners_count":17525316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T19:47:53.085Z","updated_at":"2024-11-21T19:47:54.503Z","avatar_url":"https://github.com/eclass.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sequelize-soft-delete\n\n[![npm version](https://img.shields.io/npm/v/sequelize-soft-delete.svg?style=flat-square)](https://www.npmjs.com/package/sequelize-soft-delete)\n[![npm downloads](https://img.shields.io/npm/dm/sequelize-soft-delete.svg?style=flat-square)](https://www.npmjs.com/package/sequelize-soft-delete)\n[![devDependency Status](https://img.shields.io/david/dev/eclass/sequelize-soft-delete.svg?style=flat-square)](https://david-dm.org/eclass/sequelize-soft-delete#info=devDependencies)\n\n\u003e Sequelize model plugin for add soft-delete method\n\n## Installation\n\n```bash\nnpm i sequelize-soft-delete\n```\n\n## Use\n\n```js\n// model.js\nconst sequelizeSoftDelete = require('sequelize-soft-delete')\n\nmodule.exports = (sequelize, DataTypes) =\u003e {\n  const MyModel = sequelize.define(\n    'MyModel',\n    {\n      deleted: {\n        type: DataTypes.INTEGER(1),\n        defaultValue: 0\n      }\n    },\n    {\n      defaultScope: {\n        where: {\n          deleted: 0\n        }\n      }\n    }\n  )\n  const options = {field: 'deleted', deleted: 1}\n  sequelizeSoftDelete.softDelete(MyModel, options)\n  return MyModel\n}\n\n// controller.js\nconst updated = await db.MyModel.softDelete({ where: { id: 1 } })\n```\n\n## License\n\n[MIT](https://tldrlegal.com/license/mit-license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclass%2Fsequelize-soft-delete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclass%2Fsequelize-soft-delete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclass%2Fsequelize-soft-delete/lists"}