main
| 1 | import { model } from "@medusajs/framework/utils" |
| 2 | import { Notification } from "./notification" |
| 3 | |
| 4 | export const NotificationProvider = model.define("notificationProvider", { |
| 5 | id: model.id({ prefix: "notpro" }).primaryKey(), |
| 6 | handle: model.text(), |
| 7 | name: model.text(), |
| 8 | is_enabled: model.boolean().default(true), |
| 9 | channels: model.array().default([]), |
| 10 | notifications: model.hasMany(() => Notification, { mappedBy: "provider" }), |
| 11 | }) |