@things-factory/geography 5.0.7 → 6.0.0-alpha.0
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.
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/index.js +4 -17
- package/dist-server/index.js.map +1 -1
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/index.js.map +1 -1
- package/dist-server/routes.js +0 -1
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/geo-area/geo-area-mutation.js +34 -45
- package/dist-server/service/geo-area/geo-area-mutation.js.map +1 -1
- package/dist-server/service/geo-area/geo-area-query.js +75 -48
- package/dist-server/service/geo-area/geo-area-query.js.map +1 -1
- package/dist-server/service/geo-area/geo-area-type.js +44 -52
- package/dist-server/service/geo-area/geo-area-type.js.map +1 -1
- package/dist-server/service/geo-area/geo-area.js +37 -46
- package/dist-server/service/geo-area/geo-area.js.map +1 -1
- package/dist-server/service/geo-area/index.js.map +1 -1
- package/dist-server/service/geo-city/geo-city-mutation.js +34 -45
- package/dist-server/service/geo-city/geo-city-mutation.js.map +1 -1
- package/dist-server/service/geo-city/geo-city-query.js +41 -54
- package/dist-server/service/geo-city/geo-city-query.js.map +1 -1
- package/dist-server/service/geo-city/geo-city-type.js +28 -36
- package/dist-server/service/geo-city/geo-city-type.js.map +1 -1
- package/dist-server/service/geo-city/geo-city.js +33 -42
- package/dist-server/service/geo-city/geo-city.js.map +1 -1
- package/dist-server/service/geo-city/index.js.map +1 -1
- package/dist-server/service/geo-continent/geo-continent-mutation.js +34 -45
- package/dist-server/service/geo-continent/geo-continent-mutation.js.map +1 -1
- package/dist-server/service/geo-continent/geo-continent-query.js +29 -42
- package/dist-server/service/geo-continent/geo-continent-query.js.map +1 -1
- package/dist-server/service/geo-continent/geo-continent-type.js +20 -28
- package/dist-server/service/geo-continent/geo-continent-type.js.map +1 -1
- package/dist-server/service/geo-continent/geo-continent.js +20 -29
- package/dist-server/service/geo-continent/geo-continent.js.map +1 -1
- package/dist-server/service/geo-continent/index.js.map +1 -1
- package/dist-server/service/geo-country/geo-country-mutation.js +34 -45
- package/dist-server/service/geo-country/geo-country-mutation.js.map +1 -1
- package/dist-server/service/geo-country/geo-country-query.js +46 -48
- package/dist-server/service/geo-country/geo-country-query.js.map +1 -1
- package/dist-server/service/geo-country/geo-country-type.js +24 -32
- package/dist-server/service/geo-country/geo-country-type.js.map +1 -1
- package/dist-server/service/geo-country/geo-country.js +26 -35
- package/dist-server/service/geo-country/geo-country.js.map +1 -1
- package/dist-server/service/geo-country/index.js.map +1 -1
- package/dist-server/service/geo-state/geo-state-mutation.js +34 -45
- package/dist-server/service/geo-state/geo-state-mutation.js.map +1 -1
- package/dist-server/service/geo-state/geo-state-query.js +35 -48
- package/dist-server/service/geo-state/geo-state-query.js.map +1 -1
- package/dist-server/service/geo-state/geo-state-type.js +28 -36
- package/dist-server/service/geo-state/geo-state-type.js.map +1 -1
- package/dist-server/service/geo-state/geo-state.js +28 -37
- package/dist-server/service/geo-state/geo-state.js.map +1 -1
- package/dist-server/service/geo-state/index.js.map +1 -1
- package/dist-server/service/index.js +6 -19
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +5 -5
- package/server/routes.ts +0 -2
- package/server/service/geo-area/geo-area-mutation.ts +11 -6
- package/server/service/geo-area/geo-area-query.ts +42 -8
- package/server/service/geo-area/geo-area.ts +1 -1
- package/server/service/geo-city/geo-city-mutation.ts +14 -6
- package/server/service/geo-city/geo-city-query.ts +10 -9
- package/server/service/geo-city/geo-city.ts +1 -1
- package/server/service/geo-continent/geo-continent-mutation.ts +10 -6
- package/server/service/geo-continent/geo-continent-query.ts +8 -7
- package/server/service/geo-country/geo-country-mutation.ts +13 -6
- package/server/service/geo-country/geo-country-query.ts +16 -8
- package/server/service/geo-state/geo-state-mutation.ts +10 -6
- package/server/service/geo-state/geo-state-query.ts +9 -8
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var _a, _b;
|
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
3
|
exports.GeoCity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
14
5
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
15
6
|
const type_graphql_1 = require("type-graphql");
|
|
16
7
|
const typeorm_1 = require("typeorm");
|
|
@@ -18,86 +9,86 @@ const geo_country_1 = require("../geo-country/geo-country");
|
|
|
18
9
|
const geo_state_1 = require("../geo-state/geo-state");
|
|
19
10
|
let GeoCity = class GeoCity {
|
|
20
11
|
};
|
|
21
|
-
__decorate([
|
|
12
|
+
tslib_1.__decorate([
|
|
22
13
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
23
14
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
24
|
-
__metadata("design:type", String)
|
|
15
|
+
tslib_1.__metadata("design:type", String)
|
|
25
16
|
], GeoCity.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
17
|
+
tslib_1.__decorate([
|
|
27
18
|
(0, typeorm_1.ManyToOne)(type => geo_country_1.GeoCountry),
|
|
28
19
|
(0, type_graphql_1.Field)(),
|
|
29
|
-
__metadata("design:type", geo_country_1.GeoCountry)
|
|
20
|
+
tslib_1.__metadata("design:type", geo_country_1.GeoCountry)
|
|
30
21
|
], GeoCity.prototype, "geoCountry", void 0);
|
|
31
|
-
__decorate([
|
|
22
|
+
tslib_1.__decorate([
|
|
32
23
|
(0, typeorm_1.RelationId)((geoCity) => geoCity.geoCountry),
|
|
33
|
-
__metadata("design:type", String)
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
34
25
|
], GeoCity.prototype, "geoCountryId", void 0);
|
|
35
|
-
__decorate([
|
|
26
|
+
tslib_1.__decorate([
|
|
36
27
|
(0, typeorm_1.ManyToOne)(type => geo_state_1.GeoState),
|
|
37
28
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
38
|
-
__metadata("design:type", geo_state_1.GeoState)
|
|
29
|
+
tslib_1.__metadata("design:type", geo_state_1.GeoState)
|
|
39
30
|
], GeoCity.prototype, "geoState", void 0);
|
|
40
|
-
__decorate([
|
|
31
|
+
tslib_1.__decorate([
|
|
41
32
|
(0, typeorm_1.RelationId)((geoCity) => geoCity.geoState),
|
|
42
|
-
__metadata("design:type", String)
|
|
33
|
+
tslib_1.__metadata("design:type", String)
|
|
43
34
|
], GeoCity.prototype, "geoStateId", void 0);
|
|
44
|
-
__decorate([
|
|
35
|
+
tslib_1.__decorate([
|
|
45
36
|
(0, typeorm_1.Column)(),
|
|
46
37
|
(0, type_graphql_1.Field)(),
|
|
47
|
-
__metadata("design:type", String)
|
|
38
|
+
tslib_1.__metadata("design:type", String)
|
|
48
39
|
], GeoCity.prototype, "name", void 0);
|
|
49
|
-
__decorate([
|
|
40
|
+
tslib_1.__decorate([
|
|
50
41
|
(0, typeorm_1.Column)({
|
|
51
42
|
nullable: true
|
|
52
43
|
}),
|
|
53
44
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
54
|
-
__metadata("design:type", String)
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
55
46
|
], GeoCity.prototype, "description", void 0);
|
|
56
|
-
__decorate([
|
|
47
|
+
tslib_1.__decorate([
|
|
57
48
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
58
49
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
|
-
__metadata("design:type", String)
|
|
50
|
+
tslib_1.__metadata("design:type", String)
|
|
60
51
|
], GeoCity.prototype, "latitude", void 0);
|
|
61
|
-
__decorate([
|
|
52
|
+
tslib_1.__decorate([
|
|
62
53
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
63
54
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
64
|
-
__metadata("design:type", String)
|
|
55
|
+
tslib_1.__metadata("design:type", String)
|
|
65
56
|
], GeoCity.prototype, "longitude", void 0);
|
|
66
|
-
__decorate([
|
|
57
|
+
tslib_1.__decorate([
|
|
67
58
|
(0, typeorm_1.CreateDateColumn)(),
|
|
68
59
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
69
|
-
__metadata("design:type", Date)
|
|
60
|
+
tslib_1.__metadata("design:type", Date)
|
|
70
61
|
], GeoCity.prototype, "createdAt", void 0);
|
|
71
|
-
__decorate([
|
|
62
|
+
tslib_1.__decorate([
|
|
72
63
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
73
64
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
74
|
-
__metadata("design:type", Date)
|
|
65
|
+
tslib_1.__metadata("design:type", Date)
|
|
75
66
|
], GeoCity.prototype, "updatedAt", void 0);
|
|
76
|
-
__decorate([
|
|
67
|
+
tslib_1.__decorate([
|
|
77
68
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
78
69
|
nullable: true
|
|
79
70
|
}),
|
|
80
71
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
81
|
-
__metadata("design:type",
|
|
72
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
82
73
|
], GeoCity.prototype, "creator", void 0);
|
|
83
|
-
__decorate([
|
|
74
|
+
tslib_1.__decorate([
|
|
84
75
|
(0, typeorm_1.RelationId)((geoCity) => geoCity.creator),
|
|
85
|
-
__metadata("design:type", String)
|
|
76
|
+
tslib_1.__metadata("design:type", String)
|
|
86
77
|
], GeoCity.prototype, "creatorId", void 0);
|
|
87
|
-
__decorate([
|
|
78
|
+
tslib_1.__decorate([
|
|
88
79
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
89
80
|
nullable: true
|
|
90
81
|
}),
|
|
91
82
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
92
|
-
__metadata("design:type",
|
|
83
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
93
84
|
], GeoCity.prototype, "updater", void 0);
|
|
94
|
-
__decorate([
|
|
85
|
+
tslib_1.__decorate([
|
|
95
86
|
(0, typeorm_1.RelationId)((geoCity) => geoCity.creator),
|
|
96
|
-
__metadata("design:type", String)
|
|
87
|
+
tslib_1.__metadata("design:type", String)
|
|
97
88
|
], GeoCity.prototype, "updaterId", void 0);
|
|
98
|
-
GeoCity = __decorate([
|
|
89
|
+
GeoCity = tslib_1.__decorate([
|
|
99
90
|
(0, typeorm_1.Entity)(),
|
|
100
|
-
(0, typeorm_1.Index)('ix_geo_city_0', (geoCity) => [geoCity.geoCountry, geoCity.name], { unique: true }),
|
|
91
|
+
(0, typeorm_1.Index)('ix_geo_city_0', (geoCity) => [geoCity.geoCountry, geoCity.name, geoCity.geoState], { unique: true }),
|
|
101
92
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for GeoCity' })
|
|
102
93
|
], GeoCity);
|
|
103
94
|
exports.GeoCity = GeoCity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-city.js","sourceRoot":"","sources":["../../../server/service/geo-city/geo-city.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"geo-city.js","sourceRoot":"","sources":["../../../server/service/geo-city/geo-city.ts"],"names":[],"mappings":";;;;AAAA,yDAAgD;AAChD,+CAAoD;AACpD,qCASgB;AAChB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sCACd,IAAI;0CAAA;AAIhB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;0CAAA;AAMhB;IAJC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAChB,gBAAI;wCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;0CAChC;AAMlB;IAJC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAChB,gBAAI;wCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;0CAChC;AA7DP,OAAO;IAHnB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACpH,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;GACrC,OAAO,CA8DnB;AA9DY,0BAAO","sourcesContent":["import { User } from '@things-factory/auth-base'\nimport { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\nimport { GeoCountry } from '../geo-country/geo-country'\nimport { GeoState } from '../geo-state/geo-state'\n\n@Entity()\n@Index('ix_geo_city_0', (geoCity: GeoCity) => [geoCity.geoCountry, geoCity.name, geoCity.geoState], { unique: true })\n@ObjectType({ description: 'Entity for GeoCity' })\nexport class GeoCity {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => GeoCountry)\n @Field()\n geoCountry: GeoCountry\n\n @RelationId((geoCity: GeoCity) => geoCity.geoCountry)\n geoCountryId?: string\n\n @ManyToOne(type => GeoState)\n @Field({ nullable: true })\n geoState?: GeoState\n\n @RelationId((geoCity: GeoCity) => geoCity.geoState)\n geoStateId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n latitude?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n longitude?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((geoCity: GeoCity) => geoCity.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((geoCity: GeoCity) => geoCity.creator)\n updaterId?: string\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-city/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA+C;AAC/C,2DAAqD;AAExC,QAAA,QAAQ,GAAG,CAAC,kBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,6BAAY,EAAE,mCAAe,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-city/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA+C;AAC/C,2DAAqD;AAExC,QAAA,QAAQ,GAAG,CAAC,kBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,6BAAY,EAAE,mCAAe,CAAC,CAAA","sourcesContent":["import { GeoCity } from './geo-city'\nimport { GeoCityQuery } from './geo-city-query'\nimport { GeoCityMutation } from './geo-city-mutation'\n\nexport const entities = [GeoCity]\nexport const resolvers = [GeoCityQuery, GeoCityMutation]\n"]}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
3
|
exports.GeoContinentMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
16
5
|
const type_graphql_1 = require("type-graphql");
|
|
17
6
|
const typeorm_1 = require("typeorm");
|
|
18
7
|
const geo_continent_1 = require("./geo-continent");
|
|
@@ -46,7 +35,7 @@ let GeoContinentMutation = class GeoContinentMutation {
|
|
|
46
35
|
if (_updateRecords.length > 0) {
|
|
47
36
|
for (let i = 0; i < _updateRecords.length; i++) {
|
|
48
37
|
const newRecord = _updateRecords[i];
|
|
49
|
-
const geoContinent = await geoContinentRepo.
|
|
38
|
+
const geoContinent = await geoContinentRepo.findOneBy({ id: newRecord.id });
|
|
50
39
|
const result = await geoContinentRepo.save(Object.assign(Object.assign(Object.assign({}, geoContinent), newRecord), { updater: user }));
|
|
51
40
|
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
52
41
|
}
|
|
@@ -66,53 +55,53 @@ let GeoContinentMutation = class GeoContinentMutation {
|
|
|
66
55
|
return true;
|
|
67
56
|
}
|
|
68
57
|
};
|
|
69
|
-
__decorate([
|
|
58
|
+
tslib_1.__decorate([
|
|
70
59
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
71
60
|
(0, type_graphql_1.Mutation)(returns => geo_continent_1.GeoContinent, { description: 'To create new GeoContinent' }),
|
|
72
|
-
__param(0, (0, type_graphql_1.Arg)('geoContinent')),
|
|
73
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
74
|
-
__metadata("design:type", Function),
|
|
75
|
-
__metadata("design:paramtypes", [geo_continent_type_1.NewGeoContinent, Object]),
|
|
76
|
-
__metadata("design:returntype", Promise)
|
|
61
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('geoContinent')),
|
|
62
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
63
|
+
tslib_1.__metadata("design:type", Function),
|
|
64
|
+
tslib_1.__metadata("design:paramtypes", [geo_continent_type_1.NewGeoContinent, Object]),
|
|
65
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
77
66
|
], GeoContinentMutation.prototype, "createGeoContinent", null);
|
|
78
|
-
__decorate([
|
|
67
|
+
tslib_1.__decorate([
|
|
79
68
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
80
69
|
(0, type_graphql_1.Mutation)(returns => geo_continent_1.GeoContinent, { description: 'To modify GeoContinent information' }),
|
|
81
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
82
|
-
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
83
|
-
__param(2, (0, type_graphql_1.Ctx)()),
|
|
84
|
-
__metadata("design:type", Function),
|
|
85
|
-
__metadata("design:paramtypes", [String, geo_continent_type_1.GeoContinentPatch, Object]),
|
|
86
|
-
__metadata("design:returntype", Promise)
|
|
70
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
71
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
72
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
73
|
+
tslib_1.__metadata("design:type", Function),
|
|
74
|
+
tslib_1.__metadata("design:paramtypes", [String, geo_continent_type_1.GeoContinentPatch, Object]),
|
|
75
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
87
76
|
], GeoContinentMutation.prototype, "updateGeoContinent", null);
|
|
88
|
-
__decorate([
|
|
77
|
+
tslib_1.__decorate([
|
|
89
78
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
90
79
|
(0, type_graphql_1.Mutation)(returns => [geo_continent_1.GeoContinent], { description: "To modify multiple GeoContinents' information" }),
|
|
91
|
-
__param(0, (0, type_graphql_1.Arg)('patches', type => [geo_continent_type_1.GeoContinentPatch])),
|
|
92
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
93
|
-
__metadata("design:type", Function),
|
|
94
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
95
|
-
__metadata("design:returntype", Promise)
|
|
80
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [geo_continent_type_1.GeoContinentPatch])),
|
|
81
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
82
|
+
tslib_1.__metadata("design:type", Function),
|
|
83
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
84
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
96
85
|
], GeoContinentMutation.prototype, "updateMultipleGeoContinent", null);
|
|
97
|
-
__decorate([
|
|
86
|
+
tslib_1.__decorate([
|
|
98
87
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
99
88
|
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete GeoContinent' }),
|
|
100
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
101
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
102
|
-
__metadata("design:type", Function),
|
|
103
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
104
|
-
__metadata("design:returntype", Promise)
|
|
89
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
90
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
91
|
+
tslib_1.__metadata("design:type", Function),
|
|
92
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
93
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
105
94
|
], GeoContinentMutation.prototype, "deleteGeoContinent", null);
|
|
106
|
-
__decorate([
|
|
95
|
+
tslib_1.__decorate([
|
|
107
96
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
108
97
|
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple geoContinents' }),
|
|
109
|
-
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
110
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
111
|
-
__metadata("design:type", Function),
|
|
112
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
113
|
-
__metadata("design:returntype", Promise)
|
|
98
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
99
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
100
|
+
tslib_1.__metadata("design:type", Function),
|
|
101
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
102
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
114
103
|
], GeoContinentMutation.prototype, "deleteGeoContinents", null);
|
|
115
|
-
GeoContinentMutation = __decorate([
|
|
104
|
+
GeoContinentMutation = tslib_1.__decorate([
|
|
116
105
|
(0, type_graphql_1.Resolver)(geo_continent_1.GeoContinent)
|
|
117
106
|
], GeoContinentMutation);
|
|
118
107
|
exports.GeoContinentMutation = GeoContinentMutation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-continent-mutation.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent-mutation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"geo-continent-mutation.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,mDAA8C;AAC9C,6DAAyE;AAGzE,IAAa,oBAAoB,GAAjC,MAAa,oBAAoB;IAG/B,KAAK,CAAC,kBAAkB,CACD,YAA6B,EAC3C,OAAwB;QAE/B,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,4BAAY,CAAC,CAAC,IAAI,iCAC3C,YAAY,KACf,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAID,KAAK,CAAC,kBAAkB,CACX,EAAU,EACP,KAAwB,EAC/B,OAAwB;QAE/B,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,4BAAY,CAAC,CAAA;QACjD,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,YAAY,GACZ,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAID,KAAK,CAAC,0BAA0B,CACe,OAA4B,EAClE,OAAwB;QAE/B,MAAM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AAA,kBAAG,GAAE,CAAA;;qDADe,sCAAiB;;8DAevC;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC,4BAAY,CAAC,EAAE,EAAE,WAAW,EAAE,+CAA+C,EAAE,CAAC;IAEnG,mBAAA,IAAA,kBAAG,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,sCAAiB,CAAC,CAAC,CAAA;IAC3C,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;sEAuCP;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;8DAKrD;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAE/E,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;+DASP;AAxGU,oBAAoB;IADhC,IAAA,uBAAQ,EAAC,4BAAY,CAAC;GACV,oBAAoB,CAyGhC;AAzGY,oDAAoB","sourcesContent":["import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { GeoContinent } from './geo-continent'\nimport { GeoContinentPatch, NewGeoContinent } from './geo-continent-type'\n\n@Resolver(GeoContinent)\nexport class GeoContinentMutation {\n @Directive('@transaction')\n @Mutation(returns => GeoContinent, { description: 'To create new GeoContinent' })\n async createGeoContinent(\n @Arg('geoContinent') geoContinent: NewGeoContinent,\n @Ctx() context: ResolverContext\n ): Promise<GeoContinent> {\n const { user, tx } = context.state\n\n return await tx.getRepository(GeoContinent).save({\n ...geoContinent,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => GeoContinent, { description: 'To modify GeoContinent information' })\n async updateGeoContinent(\n @Arg('id') id: string,\n @Arg('patch') patch: GeoContinentPatch,\n @Ctx() context: ResolverContext\n ): Promise<GeoContinent> {\n const { user, tx } = context.state\n\n const repository = tx.getRepository(GeoContinent)\n const geoContinent = await repository.findOne({\n where: { id }\n })\n\n return await repository.save({\n ...geoContinent,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [GeoContinent], { description: \"To modify multiple GeoContinents' information\" })\n async updateMultipleGeoContinent(\n @Arg('patches', type => [GeoContinentPatch]) patches: GeoContinentPatch[],\n @Ctx() context: ResolverContext\n ): Promise<GeoContinent[]> {\n const { user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const geoContinentRepo = tx.getRepository(GeoContinent)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await geoContinentRepo.save({\n ...newRecord,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const newRecord = _updateRecords[i]\n const geoContinent = await geoContinentRepo.findOneBy({ id: newRecord.id })\n\n const result = await geoContinentRepo.save({\n ...geoContinent,\n ...newRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete GeoContinent' })\n async deleteGeoContinent(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(GeoContinent).delete({ id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple geoContinents' })\n async deleteGeoContinents(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(GeoContinent).delete({\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|
|
@@ -1,74 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
var _a;
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.GeoContinentQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
17
6
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
18
7
|
const shell_1 = require("@things-factory/shell");
|
|
19
|
-
const type_graphql_1 = require("type-graphql");
|
|
20
|
-
const typeorm_1 = require("typeorm");
|
|
21
8
|
const geo_continent_1 = require("./geo-continent");
|
|
22
9
|
const geo_continent_type_1 = require("./geo-continent-type");
|
|
23
10
|
let GeoContinentQuery = class GeoContinentQuery {
|
|
24
11
|
async geoContinent(id, context) {
|
|
25
|
-
return await (0,
|
|
12
|
+
return await (0, shell_1.getRepository)(geo_continent_1.GeoContinent).findOne({
|
|
26
13
|
where: { id }
|
|
27
14
|
});
|
|
28
15
|
}
|
|
29
16
|
async geoContinents(params, context) {
|
|
30
17
|
const convertedParams = (0, shell_1.convertListParams)(params);
|
|
31
|
-
const [items, total] = await (0,
|
|
18
|
+
const [items, total] = await (0, shell_1.getRepository)(geo_continent_1.GeoContinent).findAndCount(convertedParams);
|
|
32
19
|
return { items, total };
|
|
33
20
|
}
|
|
34
21
|
async updater(geoContinent) {
|
|
35
|
-
return await (0,
|
|
22
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoContinent.updaterId });
|
|
36
23
|
}
|
|
37
24
|
async creator(geoContinent) {
|
|
38
|
-
return await (0,
|
|
25
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoContinent.creatorId });
|
|
39
26
|
}
|
|
40
27
|
};
|
|
41
|
-
__decorate([
|
|
28
|
+
tslib_1.__decorate([
|
|
42
29
|
(0, type_graphql_1.Query)(returns => geo_continent_1.GeoContinent, { description: 'To fetch a GeoContinent' }),
|
|
43
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
44
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
45
|
-
__metadata("design:type", Function),
|
|
46
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
47
|
-
__metadata("design:returntype", Promise)
|
|
30
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
31
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
32
|
+
tslib_1.__metadata("design:type", Function),
|
|
33
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
34
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
48
35
|
], GeoContinentQuery.prototype, "geoContinent", null);
|
|
49
|
-
__decorate([
|
|
36
|
+
tslib_1.__decorate([
|
|
50
37
|
(0, type_graphql_1.Query)(returns => geo_continent_type_1.GeoContinentList, { description: 'To fetch multiple GeoContinents' }),
|
|
51
|
-
__param(0, (0, type_graphql_1.Args)()),
|
|
52
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
53
|
-
__metadata("design:type", Function),
|
|
54
|
-
__metadata("design:paramtypes", [
|
|
55
|
-
__metadata("design:returntype", Promise)
|
|
38
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
39
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
40
|
+
tslib_1.__metadata("design:type", Function),
|
|
41
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
|
|
42
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
56
43
|
], GeoContinentQuery.prototype, "geoContinents", null);
|
|
57
|
-
__decorate([
|
|
44
|
+
tslib_1.__decorate([
|
|
58
45
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
59
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
60
|
-
__metadata("design:type", Function),
|
|
61
|
-
__metadata("design:paramtypes", [geo_continent_1.GeoContinent]),
|
|
62
|
-
__metadata("design:returntype", Promise)
|
|
46
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
47
|
+
tslib_1.__metadata("design:type", Function),
|
|
48
|
+
tslib_1.__metadata("design:paramtypes", [geo_continent_1.GeoContinent]),
|
|
49
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
63
50
|
], GeoContinentQuery.prototype, "updater", null);
|
|
64
|
-
__decorate([
|
|
51
|
+
tslib_1.__decorate([
|
|
65
52
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
66
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
67
|
-
__metadata("design:type", Function),
|
|
68
|
-
__metadata("design:paramtypes", [geo_continent_1.GeoContinent]),
|
|
69
|
-
__metadata("design:returntype", Promise)
|
|
53
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
54
|
+
tslib_1.__metadata("design:type", Function),
|
|
55
|
+
tslib_1.__metadata("design:paramtypes", [geo_continent_1.GeoContinent]),
|
|
56
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
70
57
|
], GeoContinentQuery.prototype, "creator", null);
|
|
71
|
-
GeoContinentQuery = __decorate([
|
|
58
|
+
GeoContinentQuery = tslib_1.__decorate([
|
|
72
59
|
(0, type_graphql_1.Resolver)(geo_continent_1.GeoContinent)
|
|
73
60
|
], GeoContinentQuery);
|
|
74
61
|
exports.GeoContinentQuery = GeoContinentQuery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-continent-query.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent-query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"geo-continent-query.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AAEnF,yDAAgD;AAChD,iDAAmF;AAEnF,mDAA8C;AAC9C,6DAAuD;AAGvD,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IAE5B,KAAK,CAAC,YAAY,CAAY,EAAU,EAAS,OAAwB;QACvE,OAAO,MAAM,IAAA,qBAAa,EAAC,4BAAY,CAAC,CAAC,OAAO,CAAC;YAC/C,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;IAGD,KAAK,CAAC,aAAa,CAAS,MAAiB,EAAS,OAAwB;QAC5E,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,qBAAa,EAAC,4BAAY,CAAC,CAAC,YAAY,CAAC,eAAe,CAAC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Resolver, Query, Resolver, Root } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { convertListParams, getRepository, ListParam } from '@things-factory/shell'\n\nimport { GeoContinent } from './geo-continent'\nimport { GeoContinentList } from './geo-continent-type'\n\n@Resolver(GeoContinent)\nexport class GeoContinentQuery {\n @Query(returns => GeoContinent, { description: 'To fetch a GeoContinent' })\n async geoContinent(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<GeoContinent> {\n return await getRepository(GeoContinent).findOne({\n where: { id }\n })\n }\n\n @Query(returns => GeoContinentList, { description: 'To fetch multiple GeoContinents' })\n async geoContinents(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<GeoContinentList> {\n const convertedParams = convertListParams(params)\n const [items, total] = await getRepository(GeoContinent).findAndCount(convertedParams)\n\n return { items, total }\n }\n\n @FieldResolver(type => User)\n async updater(@Root() geoContinent: GeoContinent): Promise<User> {\n return await getRepository(User).findOneBy({ id: geoContinent.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() geoContinent: GeoContinent): Promise<User> {\n return await getRepository(User).findOneBy({ id: geoContinent.creatorId })\n }\n}\n"]}
|
|
@@ -1,64 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.GeoContinentList = exports.GeoContinentPatch = exports.NewGeoContinent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
13
5
|
const type_graphql_1 = require("type-graphql");
|
|
14
6
|
const geo_continent_1 = require("./geo-continent");
|
|
15
7
|
let NewGeoContinent = class NewGeoContinent {
|
|
16
8
|
};
|
|
17
|
-
__decorate([
|
|
9
|
+
tslib_1.__decorate([
|
|
18
10
|
(0, type_graphql_1.Field)(),
|
|
19
|
-
__metadata("design:type", String)
|
|
11
|
+
tslib_1.__metadata("design:type", String)
|
|
20
12
|
], NewGeoContinent.prototype, "name", void 0);
|
|
21
|
-
__decorate([
|
|
13
|
+
tslib_1.__decorate([
|
|
22
14
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
|
-
__metadata("design:type", String)
|
|
15
|
+
tslib_1.__metadata("design:type", String)
|
|
24
16
|
], NewGeoContinent.prototype, "description", void 0);
|
|
25
|
-
NewGeoContinent = __decorate([
|
|
17
|
+
NewGeoContinent = tslib_1.__decorate([
|
|
26
18
|
(0, type_graphql_1.InputType)()
|
|
27
19
|
], NewGeoContinent);
|
|
28
20
|
exports.NewGeoContinent = NewGeoContinent;
|
|
29
21
|
let GeoContinentPatch = class GeoContinentPatch {
|
|
30
22
|
};
|
|
31
|
-
__decorate([
|
|
23
|
+
tslib_1.__decorate([
|
|
32
24
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
33
|
-
__metadata("design:type", String)
|
|
25
|
+
tslib_1.__metadata("design:type", String)
|
|
34
26
|
], GeoContinentPatch.prototype, "id", void 0);
|
|
35
|
-
__decorate([
|
|
27
|
+
tslib_1.__decorate([
|
|
36
28
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
37
|
-
__metadata("design:type", String)
|
|
29
|
+
tslib_1.__metadata("design:type", String)
|
|
38
30
|
], GeoContinentPatch.prototype, "name", void 0);
|
|
39
|
-
__decorate([
|
|
31
|
+
tslib_1.__decorate([
|
|
40
32
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
41
|
-
__metadata("design:type", String)
|
|
33
|
+
tslib_1.__metadata("design:type", String)
|
|
42
34
|
], GeoContinentPatch.prototype, "description", void 0);
|
|
43
|
-
__decorate([
|
|
35
|
+
tslib_1.__decorate([
|
|
44
36
|
(0, type_graphql_1.Field)(),
|
|
45
|
-
__metadata("design:type", String)
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
46
38
|
], GeoContinentPatch.prototype, "cuFlag", void 0);
|
|
47
|
-
GeoContinentPatch = __decorate([
|
|
39
|
+
GeoContinentPatch = tslib_1.__decorate([
|
|
48
40
|
(0, type_graphql_1.InputType)()
|
|
49
41
|
], GeoContinentPatch);
|
|
50
42
|
exports.GeoContinentPatch = GeoContinentPatch;
|
|
51
43
|
let GeoContinentList = class GeoContinentList {
|
|
52
44
|
};
|
|
53
|
-
__decorate([
|
|
45
|
+
tslib_1.__decorate([
|
|
54
46
|
(0, type_graphql_1.Field)(type => [geo_continent_1.GeoContinent]),
|
|
55
|
-
__metadata("design:type", Array)
|
|
47
|
+
tslib_1.__metadata("design:type", Array)
|
|
56
48
|
], GeoContinentList.prototype, "items", void 0);
|
|
57
|
-
__decorate([
|
|
49
|
+
tslib_1.__decorate([
|
|
58
50
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
59
|
-
__metadata("design:type", Number)
|
|
51
|
+
tslib_1.__metadata("design:type", Number)
|
|
60
52
|
], GeoContinentList.prototype, "total", void 0);
|
|
61
|
-
GeoContinentList = __decorate([
|
|
53
|
+
GeoContinentList = tslib_1.__decorate([
|
|
62
54
|
(0, type_graphql_1.ObjectType)()
|
|
63
55
|
], GeoContinentList);
|
|
64
56
|
exports.GeoContinentList = GeoContinentList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-continent-type.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent-type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"geo-continent-type.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,mDAA8C;AAG9C,IAAa,eAAe,GAA5B,MAAa,eAAe;CAM3B,CAAA;AAJC;IADC,IAAA,oBAAK,GAAE;;6CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACN;AALT,eAAe;IAD3B,IAAA,wBAAS,GAAE;GACC,eAAe,CAM3B;AANY,0CAAe;AAS5B,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;CAY7B,CAAA;AAVC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACN;AAGpB;IADC,IAAA,oBAAK,GAAE;;iDACM;AAXH,iBAAiB;IAD7B,IAAA,wBAAS,GAAE;GACC,iBAAiB,CAY7B;AAZY,8CAAiB;AAe9B,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;CAM5B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,4BAAY,CAAC,CAAC;;+CACT;AAGrB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;+CACN;AALF,gBAAgB;IAD5B,IAAA,yBAAU,GAAE;GACA,gBAAgB,CAM5B;AANY,4CAAgB","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\nimport { GeoContinent } from './geo-continent'\n\n@InputType()\nexport class NewGeoContinent {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n\n@InputType()\nexport class GeoContinentPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class GeoContinentList {\n @Field(type => [GeoContinent])\n items: GeoContinent[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -1,71 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var _a, _b;
|
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
3
|
exports.GeoContinent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
14
5
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
15
6
|
const type_graphql_1 = require("type-graphql");
|
|
16
7
|
const typeorm_1 = require("typeorm");
|
|
17
8
|
let GeoContinent = class GeoContinent {
|
|
18
9
|
};
|
|
19
|
-
__decorate([
|
|
10
|
+
tslib_1.__decorate([
|
|
20
11
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
21
12
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
22
|
-
__metadata("design:type", String)
|
|
13
|
+
tslib_1.__metadata("design:type", String)
|
|
23
14
|
], GeoContinent.prototype, "id", void 0);
|
|
24
|
-
__decorate([
|
|
15
|
+
tslib_1.__decorate([
|
|
25
16
|
(0, typeorm_1.Column)(),
|
|
26
17
|
(0, type_graphql_1.Field)(),
|
|
27
|
-
__metadata("design:type", String)
|
|
18
|
+
tslib_1.__metadata("design:type", String)
|
|
28
19
|
], GeoContinent.prototype, "name", void 0);
|
|
29
|
-
__decorate([
|
|
20
|
+
tslib_1.__decorate([
|
|
30
21
|
(0, typeorm_1.Column)({
|
|
31
22
|
nullable: true
|
|
32
23
|
}),
|
|
33
24
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
34
|
-
__metadata("design:type", String)
|
|
25
|
+
tslib_1.__metadata("design:type", String)
|
|
35
26
|
], GeoContinent.prototype, "description", void 0);
|
|
36
|
-
__decorate([
|
|
27
|
+
tslib_1.__decorate([
|
|
37
28
|
(0, typeorm_1.CreateDateColumn)(),
|
|
38
29
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
39
|
-
__metadata("design:type", Date)
|
|
30
|
+
tslib_1.__metadata("design:type", Date)
|
|
40
31
|
], GeoContinent.prototype, "createdAt", void 0);
|
|
41
|
-
__decorate([
|
|
32
|
+
tslib_1.__decorate([
|
|
42
33
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
43
34
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
44
|
-
__metadata("design:type", Date)
|
|
35
|
+
tslib_1.__metadata("design:type", Date)
|
|
45
36
|
], GeoContinent.prototype, "updatedAt", void 0);
|
|
46
|
-
__decorate([
|
|
37
|
+
tslib_1.__decorate([
|
|
47
38
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
48
39
|
nullable: true
|
|
49
40
|
}),
|
|
50
41
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
51
|
-
__metadata("design:type",
|
|
42
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
52
43
|
], GeoContinent.prototype, "creator", void 0);
|
|
53
|
-
__decorate([
|
|
44
|
+
tslib_1.__decorate([
|
|
54
45
|
(0, typeorm_1.RelationId)((geoContinent) => geoContinent.creator),
|
|
55
|
-
__metadata("design:type", String)
|
|
46
|
+
tslib_1.__metadata("design:type", String)
|
|
56
47
|
], GeoContinent.prototype, "creatorId", void 0);
|
|
57
|
-
__decorate([
|
|
48
|
+
tslib_1.__decorate([
|
|
58
49
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
59
50
|
nullable: true
|
|
60
51
|
}),
|
|
61
52
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
62
|
-
__metadata("design:type",
|
|
53
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
63
54
|
], GeoContinent.prototype, "updater", void 0);
|
|
64
|
-
__decorate([
|
|
55
|
+
tslib_1.__decorate([
|
|
65
56
|
(0, typeorm_1.RelationId)((geoContinent) => geoContinent.creator),
|
|
66
|
-
__metadata("design:type", String)
|
|
57
|
+
tslib_1.__metadata("design:type", String)
|
|
67
58
|
], GeoContinent.prototype, "updaterId", void 0);
|
|
68
|
-
GeoContinent = __decorate([
|
|
59
|
+
GeoContinent = tslib_1.__decorate([
|
|
69
60
|
(0, typeorm_1.Entity)(),
|
|
70
61
|
(0, typeorm_1.Index)('ix_geo_continent_0', (geoContinent) => [geoContinent.name], { unique: true }),
|
|
71
62
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for GeoContinent' })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-continent.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"geo-continent.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent.ts"],"names":[],"mappings":";;;;AAAA,yDAAgD;AAChD,+CAAoD;AACpD,qCASgB;AAKhB,IAAa,YAAY,GAAzB,MAAa,YAAY;CAwCxB,CAAA;AArCC;IAFC,I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CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAClG,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;GAC1C,YAAY,CAwCxB;AAxCY,oCAAY","sourcesContent":["import { User } from '@things-factory/auth-base'\nimport { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\n@Entity()\n@Index('ix_geo_continent_0', (geoContinent: GeoContinent) => [geoContinent.name], { unique: true })\n@ObjectType({ description: 'Entity for GeoContinent' })\nexport class GeoContinent {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column()\n @Field()\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((geoContinent: GeoContinent) => geoContinent.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((geoContinent: GeoContinent) => geoContinent.creator)\n updaterId?: string\n}\n"]}
|