Feat: Create customer group (#1074)
* fix babel transform-runtime regenerator required for migrations * add customer group model * add migration for customer group * add customer group model export * add customer group repository * add customer group service * add CustomerGroupRepository to "withTransaction" in CustomerGroupService * remove unnecessary argument to runtime plugin * service export ordering * add create customer group endpoint * add customergroup to route index in admin * add customer group service * add customer groups test * cleanup * duplicate error handling * ducplicate name integration test * add jsdoc * customergroup not customer * pr feedback * pipeline test * fix weird merge Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
This commit is contained in:
co-authored by
Sebastian Rindom
parent
22d387dcce
commit
b16976a6f4
@@ -1,4 +1,4 @@
|
||||
const { Customer, Address } = require("@medusajs/medusa")
|
||||
const { Customer, Address, CustomerGroup } = require("@medusajs/medusa")
|
||||
|
||||
module.exports = async (connection, data = {}) => {
|
||||
const manager = connection.manager
|
||||
@@ -35,4 +35,9 @@ module.exports = async (connection, data = {}) => {
|
||||
email: "test4@email.com",
|
||||
has_account: true,
|
||||
})
|
||||
|
||||
await manager.insert(CustomerGroup, {
|
||||
id: "customer-group-1",
|
||||
name: "vip-customers",
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user