UNPKG

@coursebuilder/adapter-drizzle

Version:

Drizzle adapter for Course Builder.

59 lines (58 loc) 2.2 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/lib/mysql/schemas/commerce/merchant-session.ts var merchant_session_exports = {}; __export(merchant_session_exports, { getMerchantSessionSchema: () => getMerchantSessionSchema }); module.exports = __toCommonJS(merchant_session_exports); var import_mysql_core = require("drizzle-orm/mysql-core"); function getMerchantSessionSchema(mysqlTable) { return mysqlTable("MerchantSession", { id: (0, import_mysql_core.varchar)("id", { length: 191 }).notNull(), organizationId: (0, import_mysql_core.varchar)("organizationId", { length: 191 }), identifier: (0, import_mysql_core.varchar)("identifier", { length: 191 }).notNull(), merchantAccountId: (0, import_mysql_core.varchar)("merchantAccountId", { length: 191 }).notNull() }, (table) => { return { merchantSessionId: (0, import_mysql_core.primaryKey)({ columns: [ table.id ], name: "MerchantSession_id" }), organizationIdIdx: (0, import_mysql_core.index)("organizationId_idx").on(table.organizationId) }; }); } __name(getMerchantSessionSchema, "getMerchantSessionSchema"); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { getMerchantSessionSchema }); //# sourceMappingURL=merchant-session.cjs.map