UNPKG

lakutata

Version:

An IoC-based universal application framework.

62 lines (54 loc) 1.96 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.Column_2 = t.Column = o; const r = e.requireGlobals(); const n = e.ColumnTypeUndefinedError; function o(e, t) { return function(o, a) { let s; if (typeof e === "string" || typeof e === "function") { s = e; } else if (e) { t = e; s = e.type; } if (!t) t = {}; const i = Reflect && Reflect.getMetadata ? Reflect.getMetadata("design:type", o, a) : undefined; if (!s && i) s = i; if (!t.type && s) t.type = s; if (t.type === "hstore" && !t.hstoreType) t.hstoreType = i === Object ? "object" : "string"; if (typeof e === "function") { (0, r.getMetadataArgsStorage)().embeddeds.push({ target: o.constructor, propertyName: a, isArray: i === Array || t.array === true, prefix: t.prefix !== undefined ? t.prefix : undefined, type: e }); } else { if (!t.type) throw new n.ColumnTypeUndefinedError(o, a); if (t.unique === true) (0, r.getMetadataArgsStorage)().uniques.push({ target: o.constructor, columns: [ a ] }); (0, r.getMetadataArgsStorage)().columns.push({ target: o.constructor, propertyName: a, mode: "regular", options: t }); if (t.generated) { (0, r.getMetadataArgsStorage)().generations.push({ target: o.constructor, propertyName: a, strategy: typeof t.generated === "string" ? t.generated : "increment" }); } } }; }