Raw
1 import { model } from "@medusajs/framework/utils"
2 import Customer from "./customer"
3 import CustomerGroup from "./customer-group"
4
5 const CustomerGroupCustomer = model.define("CustomerGroupCustomer", {
6 id: model.id({ prefix: "cusgc" }).primaryKey(),
7 created_by: model.text().nullable(),
8 metadata: model.json().nullable(),
9 customer: model.belongsTo(() => Customer, {
10 mappedBy: "groups",
11 }),
12 customer_group: model.belongsTo(() => CustomerGroup, {
13 mappedBy: "customers",
14 }),
15 })
16
17 export default CustomerGroupCustomer