feat(order): module foundation (#6399)

What:
Initial Order module foundation.
Basic models and methods to manage entites like in Cart Module
This commit is contained in:
Carlos R. L. Rodrigues
2024-02-15 13:26:00 +00:00
committed by GitHub
parent 811a004c03
commit 339a946f38
77 changed files with 3998 additions and 93 deletions
@@ -0,0 +1,29 @@
#!/usr/bin/env node
import { Modules } from "@medusajs/modules-sdk"
import { ModulesSdkUtils } from "@medusajs/utils"
import * as Models from "@models"
import { EOL } from "os"
const args = process.argv
const path = args.pop() as string
export default (async () => {
const { config } = await import("dotenv")
config()
if (!path) {
throw new Error(
`filePath is required.${EOL}Example: medusa-order-seed <filePath>`
)
}
const run = ModulesSdkUtils.buildSeedScript({
moduleName: Modules.ORDER,
models: Models,
pathToMigrations: __dirname + "/../../migrations",
seedHandler: async ({ manager, data }) => {
// TODO: Add seed logic
},
})
await run({ path })
})()