UNPKG

lakutata

Version:

An IoC-based universal application framework.

55 lines (47 loc) 1.34 kB
/* Build Date: Mon Jan 05 2026 23:52:23 GMT+0800 (China Standard Time) */ "use strict"; const e = require("./Package.internal.51.cjs"); var t = {}; Object.defineProperty(t, "__esModule", { value: true }); exports.PrimaryGeneratedColumn_2 = t.PrimaryGeneratedColumn = n; const r = e.requireGlobals(); const i = e.ObjectUtils; function n(e, t) { const n = {}; let s; if (e) { if (typeof e === "string") s = e; if (i.ObjectUtils.isObject(e)) { s = "increment"; Object.assign(n, e); } } else { s = "increment"; } if (i.ObjectUtils.isObject(t)) Object.assign(n, t); return function(e, t) { if (!n.type) { if (s === "increment" || s === "identity") { n.type = Number; } else if (s === "uuid") { n.type = "uuid"; } else if (s === "rowid") { n.type = "int"; } } n.primary = true; (0, r.getMetadataArgsStorage)().columns.push({ target: e.constructor, propertyName: t, mode: "regular", options: n }); (0, r.getMetadataArgsStorage)().generations.push({ target: e.constructor, propertyName: t, strategy: s }); }; }