feat: Add basic CRUD functionality to store module (#6510)

Adds the core model and basic CRUD around it.

Note: The store model is not complete, but I prefer doing smaller PRs so it's easier to do a proper review. Adding currencies will be a follow-up PR.
This commit is contained in:
Stevche Radevski
2024-02-26 14:23:48 +00:00
committed by GitHub
parent 7ebe885ec9
commit b13c669528
10 changed files with 598 additions and 6 deletions
+15
View File
@@ -13,6 +13,21 @@ export default class Store {
@PrimaryKey({ columnType: "text" })
id: string
@Property({ columnType: "text" })
name: string
@Property({ columnType: "text", nullable: true })
default_sales_channel_id: string | null = null
@Property({ columnType: "text", nullable: true })
default_region_id: string | null = null
@Property({ columnType: "text", nullable: true })
default_location_id: string | null = null
@Property({ columnType: "jsonb", nullable: true })
metadata: Record<string, unknown> | null = null
@Property({
onCreate: () => new Date(),
columnType: "timestamptz",