UNPKG

@coursebuilder/adapter-drizzle

Version:

Drizzle adapter for Course Builder.

65 lines (64 loc) 2.45 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-account.ts var merchant_account_exports = {}; __export(merchant_account_exports, { getMerchantAccountSchema: () => getMerchantAccountSchema }); module.exports = __toCommonJS(merchant_account_exports); var import_drizzle_orm = require("drizzle-orm"); var import_mysql_core = require("drizzle-orm/mysql-core"); function getMerchantAccountSchema(mysqlTable) { return mysqlTable("MerchantAccount", { id: (0, import_mysql_core.varchar)("id", { length: 191 }).notNull(), organizationId: (0, import_mysql_core.varchar)("organizationId", { length: 191 }), status: (0, import_mysql_core.int)("status").default(0).notNull(), createdAt: (0, import_mysql_core.timestamp)("createdAt", { mode: "date", fsp: 3 }).default(import_drizzle_orm.sql`CURRENT_TIMESTAMP(3)`).notNull(), label: (0, import_mysql_core.varchar)("label", { length: 191 }), identifier: (0, import_mysql_core.varchar)("identifier", { length: 191 }) }, (table) => { return { merchantAccountId: (0, import_mysql_core.primaryKey)({ columns: [ table.id ], name: "MerchantAccount_id" }), organizationIdIdx: (0, import_mysql_core.index)("organizationId_idx").on(table.organizationId) }; }); } __name(getMerchantAccountSchema, "getMerchantAccountSchema"); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { getMerchantAccountSchema }); //# sourceMappingURL=merchant-account.cjs.map