UNPKG

@coursebuilder/adapter-drizzle

Version:

Drizzle adapter for Course Builder.

68 lines (67 loc) 2.58 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-coupon.ts var merchant_coupon_exports = {}; __export(merchant_coupon_exports, { getMerchantCouponSchema: () => getMerchantCouponSchema }); module.exports = __toCommonJS(merchant_coupon_exports); var import_mysql_core = require("drizzle-orm/mysql-core"); function getMerchantCouponSchema(mysqlTable) { return mysqlTable("MerchantCoupon", { id: (0, import_mysql_core.varchar)("id", { length: 191 }).notNull(), identifier: (0, import_mysql_core.varchar)("identifier", { length: 191 }), organizationId: (0, import_mysql_core.varchar)("organizationId", { length: 191 }), status: (0, import_mysql_core.int)("status").default(0).notNull(), merchantAccountId: (0, import_mysql_core.varchar)("merchantAccountId", { length: 191 }).notNull(), percentageDiscount: (0, import_mysql_core.decimal)("percentageDiscount", { precision: 3, scale: 2 }).notNull(), type: (0, import_mysql_core.varchar)("type", { length: 191 }) }, (table) => { return { merchantCouponId: (0, import_mysql_core.primaryKey)({ columns: [ table.id ], name: "MerchantCoupon_id" }), merchantCouponIdentifierKey: (0, import_mysql_core.unique)("MerchantCoupon_identifier_key").on(table.identifier), organizationIdIdx: (0, import_mysql_core.index)("organizationId_idx").on(table.organizationId) }; }); } __name(getMerchantCouponSchema, "getMerchantCouponSchema"); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { getMerchantCouponSchema }); //# sourceMappingURL=merchant-coupon.cjs.map