Refactor(medusa): Create a BaseEntity and SoftDeletableEntity base class for common columns (#1315)

* refactor(medusa): Move some column to a base entity to make it easier to add new models without forgetting some columns

* styles(medusa): Cleanup models

* fix(medusa): typings due to model typings update

* feat(medusa): Cleanup models

* fix(medusa): A model must not return the generateId as part of the entity

* fix(medusa): Plugin integration snapshot

* fix(medusa): Typings from discount-rule-migration scripts

* refactor(medusa): Introduct BaseEntity/SoftDeletableEntity that the entity extends

* styles(medusa): Fix models linting

* test(medusa): Fix integration plugin tests

* feat(medusa): Create generateEntityId standalong function utility and update config to properly supprt ts spec files

* feat(medusa): Update entities to use the new utils to generate and apply the id

* test(medusa): Fix test suits

* feat(medusa): Improve generateEntityId utility
This commit is contained in:
Adrien de Peretti authored and GitHub committed 2022-05-23 14:27:58 +02:00
1 parent 2f08167480
commit 3503651ff2
90 files changed
+794 -1602

No files matched your search

+2 -1
View File
@@ -21,7 +21,7 @@
"@babel/core": "^7.14.3",
"@babel/preset-typescript": "^7.13.0",
"@types/express": "^4.17.13",
"@types/jest": "^27.0.3",
"@types/jest": "^27.5.0",
"@types/jsonwebtoken": "^8.5.5",
"babel-preset-medusa-package": "^1.1.19",
"cross-env": "^5.2.1",
@@ -32,6 +32,7 @@
"prettier": "^1.19.1",
"sqlite3": "^5.0.2",
"supertest": "^4.0.2",
"ts-jest": "^28.0.1",
"typescript": "^4.4.4"
},
"scripts": {