pangea-server 3.1.10 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.ColStrArray = exports.ColJson = void 0;
|
|
27
|
+
const seq = __importStar(require("sequelize-typescript"));
|
|
4
28
|
const column_1 = require("./column");
|
|
5
29
|
function ColJson() {
|
|
6
30
|
return (0, column_1.Column)('JSON', { defaultValue: {} });
|
|
@@ -8,12 +32,18 @@ function ColJson() {
|
|
|
8
32
|
exports.ColJson = ColJson;
|
|
9
33
|
function ColStrArray() {
|
|
10
34
|
return function (target, propertyName) {
|
|
11
|
-
(0, column_1.Column)(
|
|
35
|
+
(0, column_1.Column)(seq.DataType.TEXT('long'), {
|
|
12
36
|
get() {
|
|
37
|
+
console.log('get: ', propertyName);
|
|
13
38
|
const val = this.getDataValue(propertyName);
|
|
39
|
+
console.log('val: ', val);
|
|
40
|
+
console.log('type: ', typeof val);
|
|
14
41
|
return typeof val === 'string' && val.length > 0 ? val.split(',') : [];
|
|
15
42
|
},
|
|
16
43
|
set(val) {
|
|
44
|
+
console.log('set: ', propertyName);
|
|
45
|
+
console.log('val: ', val);
|
|
46
|
+
console.log('type: ', typeof val);
|
|
17
47
|
this.setDataValue(propertyName, val.join(','));
|
|
18
48
|
},
|
|
19
49
|
})(target, propertyName);
|