Mark keys as primary with explicit method call (#7900)
This commit is contained in:
@@ -2,7 +2,7 @@ import { model } from "@medusajs/utils"
|
||||
import { Notification } from "./notification"
|
||||
|
||||
export const NotificationProvider = model.define("notificationProvider", {
|
||||
id: model.id({ prefix: "notpro" }),
|
||||
id: model.id({ prefix: "notpro" }).primaryKey(),
|
||||
handle: model.text(),
|
||||
name: model.text(),
|
||||
is_enabled: model.boolean().default(true),
|
||||
|
||||
@@ -3,7 +3,7 @@ import { NotificationProvider } from "./notification-provider"
|
||||
|
||||
// We probably want to have a TTL for each entry, so we don't bloat the DB (and also for GDPR reasons if TTL < 30 days).
|
||||
export const Notification = model.define("notification", {
|
||||
id: model.id({ prefix: "noti" }),
|
||||
id: model.id({ prefix: "noti" }).primaryKey(),
|
||||
// This can be an email, phone number, or username, depending on the channel.
|
||||
to: model.text(),
|
||||
channel: model.text(),
|
||||
|
||||
Reference in New Issue
Block a user