feat(pricing, types, utils, medusa-sdk): Pricing Module Setup + Currency (#4860)
What: - Setups the skeleton for pricing module - Creates service/model/repository for currency model - Setups types - Setups DB - Moved some utils to a common place RESOLVES CORE-1477 RESOLVES CORE-1476
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { Entity, PrimaryKey, Property } from "@mikro-orm/core"
|
||||
|
||||
@Entity({ tableName: "currency" })
|
||||
class Currency {
|
||||
@PrimaryKey({ columnType: "text" })
|
||||
code!: string
|
||||
|
||||
@Property({ columnType: "text" })
|
||||
symbol: string
|
||||
|
||||
@Property({ columnType: "text" })
|
||||
symbol_native: string
|
||||
|
||||
@Property({ columnType: "text" })
|
||||
name: string
|
||||
|
||||
// @Property({ persist: false })
|
||||
// get includes_tax() {
|
||||
// // TODO: This comes from a feature flag
|
||||
// // Figure out how we're handling FF in modules
|
||||
// // For now, returning default as true
|
||||
// // This should also not fall on the hands of the model
|
||||
// return true
|
||||
// }
|
||||
}
|
||||
|
||||
export default Currency
|
||||
@@ -0,0 +1 @@
|
||||
export { default as Currency } from "./currency"
|
||||
Reference in New Issue
Block a user