lakutata
Version:
An IoC-based universal application framework.
62 lines (54 loc) • 1.92 kB
JavaScript
/* Build Date: Mon Jan 05 2026 23:52:23 GMT+0800 (China Standard Time) */
import { a as e, C as t } from "./Package.internal.51.mjs";
var r = {};
Object.defineProperty(r, "__esModule", {
value: true
});
var a = r.Column = s;
const n = e();
const o = t;
function s(e, t) {
return function(r, 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", r, 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, n.getMetadataArgsStorage)().embeddeds.push({
target: r.constructor,
propertyName: a,
isArray: i === Array || t.array === true,
prefix: t.prefix !== undefined ? t.prefix : undefined,
type: e
});
} else {
if (!t.type) throw new o.ColumnTypeUndefinedError(r, a);
if (t.unique === true) (0, n.getMetadataArgsStorage)().uniques.push({
target: r.constructor,
columns: [ a ]
});
(0, n.getMetadataArgsStorage)().columns.push({
target: r.constructor,
propertyName: a,
mode: "regular",
options: t
});
if (t.generated) {
(0, n.getMetadataArgsStorage)().generations.push({
target: r.constructor,
propertyName: a,
strategy: typeof t.generated === "string" ? t.generated : "increment"
});
}
}
};
}
export { a as C };