fix: missing files
This commit is contained in:
1 parent
824bcce3dd
commit
c9f1858649
3 files changed
+48
-1
No files matched your search
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/modules-sdk": patch
|
||||||
|
"@medusajs/payment": patch
|
||||||
|
"@medusajs/types": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: add Payment module package
|
||||||
@@ -3,4 +3,4 @@ if (typeof process.env.DB_TEMP_NAME === "undefined") {
|
|||||||
process.env.DB_TEMP_NAME = `medusa-payment-integration-${tempName}`
|
process.env.DB_TEMP_NAME = `medusa-payment-integration-${tempName}`
|
||||||
}
|
}
|
||||||
|
|
||||||
process.env.MEDUSA_CART_DB_SCHEMA = "public"
|
process.env.MEDUSA_PAYMENT_DB_SCHEMA = "public"
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
import {
|
||||||
|
BeforeCreate,
|
||||||
|
Entity,
|
||||||
|
OnInit,
|
||||||
|
PrimaryKey,
|
||||||
|
Property,
|
||||||
|
} from "@mikro-orm/core"
|
||||||
|
|
||||||
|
import { generateEntityId } from "@medusajs/utils"
|
||||||
|
|
||||||
|
@Entity({ tableName: "payment" })
|
||||||
|
export default class Payment {
|
||||||
|
@PrimaryKey({ columnType: "text" })
|
||||||
|
id: string
|
||||||
|
|
||||||
|
@Property({
|
||||||
|
onCreate: () => new Date(),
|
||||||
|
columnType: "timestamptz",
|
||||||
|
defaultRaw: "now()",
|
||||||
|
})
|
||||||
|
created_at: Date
|
||||||
|
|
||||||
|
@Property({
|
||||||
|
onCreate: () => new Date(),
|
||||||
|
onUpdate: () => new Date(),
|
||||||
|
columnType: "timestamptz",
|
||||||
|
defaultRaw: "now()",
|
||||||
|
})
|
||||||
|
updated_at: Date
|
||||||
|
|
||||||
|
@BeforeCreate()
|
||||||
|
onCreate() {
|
||||||
|
this.id = generateEntityId(this.id, "pay")
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnInit()
|
||||||
|
onInit() {
|
||||||
|
this.id = generateEntityId(this.id, "pay")
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user