@things-factory/rack-base 5.0.8 → 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.
Files changed (168) hide show
  1. package/client/bootstrap.ts +1 -0
  2. package/{server/controllers → client}/index.ts +0 -0
  3. package/client/pages/cell/cell-importer.ts +97 -0
  4. package/client/pages/cell/cell-list-page.ts +337 -0
  5. package/client/pages/rack/rack-importer.ts +97 -0
  6. package/client/pages/rack/rack-list-page.ts +337 -0
  7. package/client/route.ts +11 -0
  8. package/dist-server/index.d.ts +1 -0
  9. package/dist-server/index.js +1 -5
  10. package/dist-server/index.js.map +1 -1
  11. package/dist-server/migrations/index.d.ts +1 -0
  12. package/dist-server/routes.d.ts +0 -0
  13. package/dist-server/routes.js +0 -1
  14. package/dist-server/routes.js.map +1 -1
  15. package/dist-server/service/cell/cell-mutation.d.ts +10 -0
  16. package/dist-server/service/cell/cell-mutation.js +128 -0
  17. package/dist-server/service/cell/cell-mutation.js.map +1 -0
  18. package/dist-server/service/cell/cell-query.d.ts +11 -0
  19. package/dist-server/service/cell/cell-query.js +79 -0
  20. package/dist-server/service/cell/cell-query.js.map +1 -0
  21. package/dist-server/service/cell/cell-type.d.ts +35 -0
  22. package/dist-server/service/cell/cell-type.js +137 -0
  23. package/dist-server/service/cell/cell-type.js.map +1 -0
  24. package/dist-server/service/cell/cell.d.ts +26 -0
  25. package/dist-server/{entities → service/cell}/cell.js +54 -44
  26. package/dist-server/service/cell/cell.js.map +1 -0
  27. package/dist-server/service/cell/index.d.ts +5 -0
  28. package/dist-server/service/cell/index.js +9 -0
  29. package/dist-server/service/cell/index.js.map +1 -0
  30. package/dist-server/service/index.d.ts +6 -0
  31. package/dist-server/service/index.js +23 -0
  32. package/dist-server/service/index.js.map +1 -0
  33. package/dist-server/service/rack/index.d.ts +5 -0
  34. package/dist-server/service/rack/index.js +9 -0
  35. package/dist-server/service/rack/index.js.map +1 -0
  36. package/dist-server/service/rack/rack-mutation.d.ts +10 -0
  37. package/dist-server/service/rack/rack-mutation.js +128 -0
  38. package/dist-server/service/rack/rack-mutation.js.map +1 -0
  39. package/dist-server/service/rack/rack-query.d.ts +12 -0
  40. package/dist-server/service/rack/rack-query.js +97 -0
  41. package/dist-server/service/rack/rack-query.js.map +1 -0
  42. package/dist-server/service/rack/rack-type.d.ts +21 -0
  43. package/dist-server/service/rack/rack-type.js +81 -0
  44. package/dist-server/service/rack/rack-type.js.map +1 -0
  45. package/dist-server/service/rack/rack.d.ts +18 -0
  46. package/dist-server/{entities → service/rack}/rack.js +36 -24
  47. package/dist-server/service/rack/rack.js.map +1 -0
  48. package/dist-server/tsconfig.tsbuildinfo +1 -1
  49. package/package.json +12 -10
  50. package/server/index.ts +1 -6
  51. package/server/routes.ts +0 -2
  52. package/server/service/cell/cell-mutation.ts +133 -0
  53. package/server/service/cell/cell-query.ts +50 -0
  54. package/server/service/cell/cell-type.ts +96 -0
  55. package/server/service/cell/cell.ts +112 -0
  56. package/server/service/cell/index.ts +6 -0
  57. package/server/service/index.ts +22 -0
  58. package/server/service/rack/index.ts +6 -0
  59. package/server/service/rack/rack-mutation.ts +133 -0
  60. package/server/service/rack/rack-query.ts +64 -0
  61. package/server/service/rack/rack-type.ts +54 -0
  62. package/server/service/rack/rack.ts +76 -0
  63. package/things-factory.config.js +4 -6
  64. package/client/actions/main.js +0 -1
  65. package/client/bootstrap.js +0 -8
  66. package/client/index.js +0 -1
  67. package/client/pages/main.js +0 -27
  68. package/client/reducers/main.js +0 -17
  69. package/client/route.js +0 -10
  70. package/dist-server/controllers/index.js +0 -1
  71. package/dist-server/controllers/index.js.map +0 -1
  72. package/dist-server/entities/cell.js.map +0 -1
  73. package/dist-server/entities/index.js +0 -12
  74. package/dist-server/entities/index.js.map +0 -1
  75. package/dist-server/entities/rack.js.map +0 -1
  76. package/dist-server/graphql/index.js +0 -11
  77. package/dist-server/graphql/index.js.map +0 -1
  78. package/dist-server/graphql/resolvers/cell/cell.js +0 -15
  79. package/dist-server/graphql/resolvers/cell/cell.js.map +0 -1
  80. package/dist-server/graphql/resolvers/cell/cells.js +0 -14
  81. package/dist-server/graphql/resolvers/cell/cells.js.map +0 -1
  82. package/dist-server/graphql/resolvers/cell/create-cell.js +0 -11
  83. package/dist-server/graphql/resolvers/cell/create-cell.js.map +0 -1
  84. package/dist-server/graphql/resolvers/cell/delete-cell.js +0 -12
  85. package/dist-server/graphql/resolvers/cell/delete-cell.js.map +0 -1
  86. package/dist-server/graphql/resolvers/cell/delete-cells.js +0 -15
  87. package/dist-server/graphql/resolvers/cell/delete-cells.js.map +0 -1
  88. package/dist-server/graphql/resolvers/cell/index.js +0 -13
  89. package/dist-server/graphql/resolvers/cell/index.js.map +0 -1
  90. package/dist-server/graphql/resolvers/cell/update-cell.js +0 -15
  91. package/dist-server/graphql/resolvers/cell/update-cell.js.map +0 -1
  92. package/dist-server/graphql/resolvers/cell/update-multiple-cell.js +0 -30
  93. package/dist-server/graphql/resolvers/cell/update-multiple-cell.js.map +0 -1
  94. package/dist-server/graphql/resolvers/index.js +0 -15
  95. package/dist-server/graphql/resolvers/index.js.map +0 -1
  96. package/dist-server/graphql/resolvers/rack/create-rack.js +0 -11
  97. package/dist-server/graphql/resolvers/rack/create-rack.js.map +0 -1
  98. package/dist-server/graphql/resolvers/rack/delete-rack.js +0 -12
  99. package/dist-server/graphql/resolvers/rack/delete-rack.js.map +0 -1
  100. package/dist-server/graphql/resolvers/rack/delete-racks.js +0 -15
  101. package/dist-server/graphql/resolvers/rack/delete-racks.js.map +0 -1
  102. package/dist-server/graphql/resolvers/rack/index.js +0 -13
  103. package/dist-server/graphql/resolvers/rack/index.js.map +0 -1
  104. package/dist-server/graphql/resolvers/rack/rack.js +0 -15
  105. package/dist-server/graphql/resolvers/rack/rack.js.map +0 -1
  106. package/dist-server/graphql/resolvers/rack/racks.js +0 -14
  107. package/dist-server/graphql/resolvers/rack/racks.js.map +0 -1
  108. package/dist-server/graphql/resolvers/rack/update-multiple-rack.js +0 -30
  109. package/dist-server/graphql/resolvers/rack/update-multiple-rack.js.map +0 -1
  110. package/dist-server/graphql/resolvers/rack/update-rack.js +0 -15
  111. package/dist-server/graphql/resolvers/rack/update-rack.js.map +0 -1
  112. package/dist-server/graphql/types/cell/cell-list.js +0 -12
  113. package/dist-server/graphql/types/cell/cell-list.js.map +0 -1
  114. package/dist-server/graphql/types/cell/cell-patch.js +0 -24
  115. package/dist-server/graphql/types/cell/cell-patch.js.map +0 -1
  116. package/dist-server/graphql/types/cell/cell.js +0 -28
  117. package/dist-server/graphql/types/cell/cell.js.map +0 -1
  118. package/dist-server/graphql/types/cell/index.js +0 -35
  119. package/dist-server/graphql/types/cell/index.js.map +0 -1
  120. package/dist-server/graphql/types/cell/new-cell.js +0 -22
  121. package/dist-server/graphql/types/cell/new-cell.js.map +0 -1
  122. package/dist-server/graphql/types/index.js +0 -19
  123. package/dist-server/graphql/types/index.js.map +0 -1
  124. package/dist-server/graphql/types/rack/index.js +0 -35
  125. package/dist-server/graphql/types/rack/index.js.map +0 -1
  126. package/dist-server/graphql/types/rack/new-rack.js +0 -15
  127. package/dist-server/graphql/types/rack/new-rack.js.map +0 -1
  128. package/dist-server/graphql/types/rack/rack-list.js +0 -12
  129. package/dist-server/graphql/types/rack/rack-list.js.map +0 -1
  130. package/dist-server/graphql/types/rack/rack-patch.js +0 -16
  131. package/dist-server/graphql/types/rack/rack-patch.js.map +0 -1
  132. package/dist-server/graphql/types/rack/rack.js +0 -21
  133. package/dist-server/graphql/types/rack/rack.js.map +0 -1
  134. package/dist-server/middlewares/index.js +0 -8
  135. package/dist-server/middlewares/index.js.map +0 -1
  136. package/server/entities/cell.ts +0 -95
  137. package/server/entities/index.ts +0 -12
  138. package/server/entities/rack.ts +0 -56
  139. package/server/graphql/index.ts +0 -7
  140. package/server/graphql/resolvers/cell/cell.ts +0 -14
  141. package/server/graphql/resolvers/cell/cells.ts +0 -14
  142. package/server/graphql/resolvers/cell/create-cell.ts +0 -14
  143. package/server/graphql/resolvers/cell/delete-cell.ts +0 -10
  144. package/server/graphql/resolvers/cell/delete-cells.ts +0 -13
  145. package/server/graphql/resolvers/cell/index.ts +0 -21
  146. package/server/graphql/resolvers/cell/update-cell.ts +0 -17
  147. package/server/graphql/resolvers/cell/update-multiple-cell.ts +0 -44
  148. package/server/graphql/resolvers/index.ts +0 -12
  149. package/server/graphql/resolvers/rack/create-rack.ts +0 -14
  150. package/server/graphql/resolvers/rack/delete-rack.ts +0 -10
  151. package/server/graphql/resolvers/rack/delete-racks.ts +0 -13
  152. package/server/graphql/resolvers/rack/index.ts +0 -21
  153. package/server/graphql/resolvers/rack/rack.ts +0 -14
  154. package/server/graphql/resolvers/rack/racks.ts +0 -14
  155. package/server/graphql/resolvers/rack/update-multiple-rack.ts +0 -44
  156. package/server/graphql/resolvers/rack/update-rack.ts +0 -17
  157. package/server/graphql/types/cell/cell-list.ts +0 -8
  158. package/server/graphql/types/cell/cell-patch.ts +0 -20
  159. package/server/graphql/types/cell/cell.ts +0 -24
  160. package/server/graphql/types/cell/index.ts +0 -34
  161. package/server/graphql/types/cell/new-cell.ts +0 -18
  162. package/server/graphql/types/index.ts +0 -17
  163. package/server/graphql/types/rack/index.ts +0 -34
  164. package/server/graphql/types/rack/new-rack.ts +0 -11
  165. package/server/graphql/types/rack/rack-list.ts +0 -8
  166. package/server/graphql/types/rack/rack-patch.ts +0 -12
  167. package/server/graphql/types/rack/rack.ts +0 -17
  168. package/server/middlewares/index.ts +0 -3
@@ -0,0 +1,35 @@
1
+ import { Cell } from './cell';
2
+ export declare class NewCell {
3
+ stationCd: string;
4
+ equipCd: string;
5
+ cellCd: string;
6
+ indCd: string;
7
+ channelNo: string;
8
+ panNo: string;
9
+ equipZone?: string;
10
+ sideCd?: string;
11
+ cellSeq?: number;
12
+ printerCd?: string;
13
+ activeFlag?: boolean;
14
+ status?: string;
15
+ }
16
+ export declare class CellPatch {
17
+ id?: string;
18
+ stationCd?: string;
19
+ equipCd?: string;
20
+ cellCd?: string;
21
+ indCd?: string;
22
+ channelNo?: string;
23
+ panNo?: string;
24
+ equipZone?: string;
25
+ sideCd?: string;
26
+ cellSeq?: number;
27
+ printerCd?: string;
28
+ activeFlag?: boolean;
29
+ status?: string;
30
+ cuFlag?: string;
31
+ }
32
+ export declare class CellList {
33
+ items: Cell[];
34
+ total: number;
35
+ }
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CellList = exports.CellPatch = exports.NewCell = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const cell_1 = require("./cell");
7
+ let NewCell = class NewCell {
8
+ };
9
+ tslib_1.__decorate([
10
+ (0, type_graphql_1.Field)({ nullable: true }),
11
+ tslib_1.__metadata("design:type", String)
12
+ ], NewCell.prototype, "stationCd", void 0);
13
+ tslib_1.__decorate([
14
+ (0, type_graphql_1.Field)(),
15
+ tslib_1.__metadata("design:type", String)
16
+ ], NewCell.prototype, "equipCd", void 0);
17
+ tslib_1.__decorate([
18
+ (0, type_graphql_1.Field)(),
19
+ tslib_1.__metadata("design:type", String)
20
+ ], NewCell.prototype, "cellCd", void 0);
21
+ tslib_1.__decorate([
22
+ (0, type_graphql_1.Field)(),
23
+ tslib_1.__metadata("design:type", String)
24
+ ], NewCell.prototype, "indCd", void 0);
25
+ tslib_1.__decorate([
26
+ (0, type_graphql_1.Field)(),
27
+ tslib_1.__metadata("design:type", String)
28
+ ], NewCell.prototype, "channelNo", void 0);
29
+ tslib_1.__decorate([
30
+ (0, type_graphql_1.Field)(),
31
+ tslib_1.__metadata("design:type", String)
32
+ ], NewCell.prototype, "panNo", void 0);
33
+ tslib_1.__decorate([
34
+ (0, type_graphql_1.Field)({ nullable: true }),
35
+ tslib_1.__metadata("design:type", String)
36
+ ], NewCell.prototype, "equipZone", void 0);
37
+ tslib_1.__decorate([
38
+ (0, type_graphql_1.Field)({ nullable: true }),
39
+ tslib_1.__metadata("design:type", String)
40
+ ], NewCell.prototype, "sideCd", void 0);
41
+ tslib_1.__decorate([
42
+ (0, type_graphql_1.Field)({ nullable: true }),
43
+ tslib_1.__metadata("design:type", Number)
44
+ ], NewCell.prototype, "cellSeq", void 0);
45
+ tslib_1.__decorate([
46
+ (0, type_graphql_1.Field)({ nullable: true }),
47
+ tslib_1.__metadata("design:type", String)
48
+ ], NewCell.prototype, "printerCd", void 0);
49
+ tslib_1.__decorate([
50
+ (0, type_graphql_1.Field)({ nullable: true }),
51
+ tslib_1.__metadata("design:type", Boolean)
52
+ ], NewCell.prototype, "activeFlag", void 0);
53
+ tslib_1.__decorate([
54
+ (0, type_graphql_1.Field)({ nullable: true }),
55
+ tslib_1.__metadata("design:type", String)
56
+ ], NewCell.prototype, "status", void 0);
57
+ NewCell = tslib_1.__decorate([
58
+ (0, type_graphql_1.InputType)()
59
+ ], NewCell);
60
+ exports.NewCell = NewCell;
61
+ let CellPatch = class CellPatch {
62
+ };
63
+ tslib_1.__decorate([
64
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
65
+ tslib_1.__metadata("design:type", String)
66
+ ], CellPatch.prototype, "id", void 0);
67
+ tslib_1.__decorate([
68
+ (0, type_graphql_1.Field)({ nullable: true }),
69
+ tslib_1.__metadata("design:type", String)
70
+ ], CellPatch.prototype, "stationCd", void 0);
71
+ tslib_1.__decorate([
72
+ (0, type_graphql_1.Field)({ nullable: true }),
73
+ tslib_1.__metadata("design:type", String)
74
+ ], CellPatch.prototype, "equipCd", void 0);
75
+ tslib_1.__decorate([
76
+ (0, type_graphql_1.Field)({ nullable: true }),
77
+ tslib_1.__metadata("design:type", String)
78
+ ], CellPatch.prototype, "cellCd", void 0);
79
+ tslib_1.__decorate([
80
+ (0, type_graphql_1.Field)({ nullable: true }),
81
+ tslib_1.__metadata("design:type", String)
82
+ ], CellPatch.prototype, "indCd", void 0);
83
+ tslib_1.__decorate([
84
+ (0, type_graphql_1.Field)({ nullable: true }),
85
+ tslib_1.__metadata("design:type", String)
86
+ ], CellPatch.prototype, "channelNo", void 0);
87
+ tslib_1.__decorate([
88
+ (0, type_graphql_1.Field)({ nullable: true }),
89
+ tslib_1.__metadata("design:type", String)
90
+ ], CellPatch.prototype, "panNo", void 0);
91
+ tslib_1.__decorate([
92
+ (0, type_graphql_1.Field)({ nullable: true }),
93
+ tslib_1.__metadata("design:type", String)
94
+ ], CellPatch.prototype, "equipZone", void 0);
95
+ tslib_1.__decorate([
96
+ (0, type_graphql_1.Field)({ nullable: true }),
97
+ tslib_1.__metadata("design:type", String)
98
+ ], CellPatch.prototype, "sideCd", void 0);
99
+ tslib_1.__decorate([
100
+ (0, type_graphql_1.Field)({ nullable: true }),
101
+ tslib_1.__metadata("design:type", Number)
102
+ ], CellPatch.prototype, "cellSeq", void 0);
103
+ tslib_1.__decorate([
104
+ (0, type_graphql_1.Field)({ nullable: true }),
105
+ tslib_1.__metadata("design:type", String)
106
+ ], CellPatch.prototype, "printerCd", void 0);
107
+ tslib_1.__decorate([
108
+ (0, type_graphql_1.Field)({ nullable: true }),
109
+ tslib_1.__metadata("design:type", Boolean)
110
+ ], CellPatch.prototype, "activeFlag", void 0);
111
+ tslib_1.__decorate([
112
+ (0, type_graphql_1.Field)({ nullable: true }),
113
+ tslib_1.__metadata("design:type", String)
114
+ ], CellPatch.prototype, "status", void 0);
115
+ tslib_1.__decorate([
116
+ (0, type_graphql_1.Field)({ nullable: true }),
117
+ tslib_1.__metadata("design:type", String)
118
+ ], CellPatch.prototype, "cuFlag", void 0);
119
+ CellPatch = tslib_1.__decorate([
120
+ (0, type_graphql_1.InputType)()
121
+ ], CellPatch);
122
+ exports.CellPatch = CellPatch;
123
+ let CellList = class CellList {
124
+ };
125
+ tslib_1.__decorate([
126
+ (0, type_graphql_1.Field)(type => [cell_1.Cell]),
127
+ tslib_1.__metadata("design:type", Array)
128
+ ], CellList.prototype, "items", void 0);
129
+ tslib_1.__decorate([
130
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
131
+ tslib_1.__metadata("design:type", Number)
132
+ ], CellList.prototype, "total", void 0);
133
+ CellList = tslib_1.__decorate([
134
+ (0, type_graphql_1.ObjectType)()
135
+ ], CellList);
136
+ exports.CellList = CellList;
137
+ //# sourceMappingURL=cell-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-type.js","sourceRoot":"","sources":["../../../server/service/cell/cell-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,iCAA6B;AAG7B,IAAa,OAAO,GAApB,MAAa,OAAO;CAoCnB,CAAA;AAlCC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACT;AAGjB;IADC,IAAA,oBAAK,GAAE;;wCACO;AAGf;IADC,IAAA,oBAAK,GAAE;;uCACM;AAGd;IADC,IAAA,oBAAK,GAAE;;sCACK;AAGb;IADC,IAAA,oBAAK,GAAE;;0CACS;AAGjB;IADC,IAAA,oBAAK,GAAE;;sCACK;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACR;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACX;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACR;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACX;AAnCJ,OAAO;IADnB,IAAA,wBAAS,GAAE;GACC,OAAO,CAoCnB;AApCY,0BAAO;AAuCpB,IAAa,SAAS,GAAtB,MAAa,SAAS;CA0CrB,CAAA;AAxCC;IADC,IAAA,oBAAK,EAAC,IAA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AAE,CAAC,CAAC,WAAI,CAAC,CAAC;;uCACT;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;uCACN;AALF,QAAQ;IADpB,IAAA,yBAAU,GAAE;GACA,QAAQ,CAMpB;AANY,4BAAQ","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { Cell } from './cell'\n\n@InputType()\nexport class NewCell {\n @Field({ nullable: true })\n stationCd: string\n\n @Field()\n equipCd: string\n\n @Field()\n cellCd: string\n\n @Field()\n indCd: string\n\n @Field()\n channelNo: string\n\n @Field()\n panNo: string\n\n @Field({ nullable: true })\n equipZone?: string\n\n @Field({ nullable: true })\n sideCd?: string\n\n @Field({ nullable: true })\n cellSeq?: number\n\n @Field({ nullable: true })\n printerCd?: string\n\n @Field({ nullable: true })\n activeFlag?: boolean\n\n @Field({ nullable: true })\n status?: string\n}\n\n@InputType()\nexport class CellPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n stationCd?: string\n\n @Field({ nullable: true })\n equipCd?: string\n\n @Field({ nullable: true })\n cellCd?: string\n\n @Field({ nullable: true })\n indCd?: string\n\n @Field({ nullable: true })\n channelNo?: string\n\n @Field({ nullable: true })\n panNo?: string\n\n @Field({ nullable: true })\n equipZone?: string\n\n @Field({ nullable: true })\n sideCd?: string\n\n @Field({ nullable: true })\n cellSeq?: number\n\n @Field({ nullable: true })\n printerCd?: string\n\n @Field({ nullable: true })\n activeFlag?: boolean\n\n @Field({ nullable: true })\n status?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class CellList {\n @Field(type => [Cell])\n items: Cell[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -0,0 +1,26 @@
1
+ import { User } from '@things-factory/auth-base';
2
+ import { Domain } from '@things-factory/shell';
3
+ export declare class Cell {
4
+ readonly id: string;
5
+ domain?: Domain;
6
+ domainId?: string;
7
+ stationCd: string;
8
+ equipCd: string;
9
+ cellCd: string;
10
+ indCd: string;
11
+ channelNo: string;
12
+ panNo: string;
13
+ equipZone?: string;
14
+ sideCd?: string;
15
+ cellSeq?: number;
16
+ printerCd?: string;
17
+ activeFlag?: boolean;
18
+ status?: string;
19
+ params?: string;
20
+ createdAt?: Date;
21
+ updatedAt?: Date;
22
+ creator?: User;
23
+ creatorId?: string;
24
+ updater?: User;
25
+ updaterId?: string;
26
+ }
@@ -1,122 +1,132 @@
1
1
  "use strict";
2
- var _a, _b, _c;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.Cell = void 0;
5
4
  const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
6
  const typeorm_1 = require("typeorm");
7
- const shell_1 = require("@things-factory/shell");
8
7
  const auth_base_1 = require("@things-factory/auth-base");
8
+ const shell_1 = require("@things-factory/shell");
9
9
  let Cell = class Cell {
10
10
  };
11
11
  tslib_1.__decorate([
12
12
  (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
13
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
13
14
  tslib_1.__metadata("design:type", String)
14
15
  ], Cell.prototype, "id", void 0);
15
16
  tslib_1.__decorate([
16
17
  (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
17
- tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
18
+ (0, type_graphql_1.Field)({ nullable: true }),
19
+ tslib_1.__metadata("design:type", shell_1.Domain)
18
20
  ], Cell.prototype, "domain", void 0);
19
21
  tslib_1.__decorate([
20
- (0, typeorm_1.Column)({
21
- nullable: true,
22
- length: 30
23
- }),
22
+ (0, typeorm_1.RelationId)((cell) => cell.domain),
23
+ tslib_1.__metadata("design:type", String)
24
+ ], Cell.prototype, "domainId", void 0);
25
+ tslib_1.__decorate([
26
+ (0, typeorm_1.Column)({ nullable: true, length: 30 }),
27
+ (0, type_graphql_1.Field)({ nullable: true }),
24
28
  tslib_1.__metadata("design:type", String)
25
29
  ], Cell.prototype, "stationCd", void 0);
26
30
  tslib_1.__decorate([
27
- (0, typeorm_1.Column)({
28
- length: 30
29
- }),
31
+ (0, typeorm_1.Column)({ length: 30 }),
32
+ (0, type_graphql_1.Field)(),
30
33
  tslib_1.__metadata("design:type", String)
31
34
  ], Cell.prototype, "equipCd", void 0);
32
35
  tslib_1.__decorate([
33
- (0, typeorm_1.Column)({
34
- length: 30
35
- }),
36
+ (0, typeorm_1.Column)({ length: 30 }),
37
+ (0, type_graphql_1.Field)(),
36
38
  tslib_1.__metadata("design:type", String)
37
39
  ], Cell.prototype, "cellCd", void 0);
38
40
  tslib_1.__decorate([
39
- (0, typeorm_1.Column)({
40
- length: 30
41
- }),
41
+ (0, typeorm_1.Column)({ length: 30 }),
42
+ (0, type_graphql_1.Field)(),
42
43
  tslib_1.__metadata("design:type", String)
43
44
  ], Cell.prototype, "indCd", void 0);
44
45
  tslib_1.__decorate([
45
- (0, typeorm_1.Column)({
46
- length: 40
47
- }),
46
+ (0, typeorm_1.Column)({ length: 40 }),
47
+ (0, type_graphql_1.Field)(),
48
48
  tslib_1.__metadata("design:type", String)
49
49
  ], Cell.prototype, "channelNo", void 0);
50
50
  tslib_1.__decorate([
51
- (0, typeorm_1.Column)({
52
- length: 40
53
- }),
51
+ (0, typeorm_1.Column)({ length: 40 }),
52
+ (0, type_graphql_1.Field)(),
54
53
  tslib_1.__metadata("design:type", String)
55
54
  ], Cell.prototype, "panNo", void 0);
56
55
  tslib_1.__decorate([
57
- (0, typeorm_1.Column)({
58
- nullable: true,
59
- length: 30
60
- }),
56
+ (0, typeorm_1.Column)({ nullable: true, length: 30 }),
57
+ (0, type_graphql_1.Field)({ nullable: true }),
61
58
  tslib_1.__metadata("design:type", String)
62
59
  ], Cell.prototype, "equipZone", void 0);
63
60
  tslib_1.__decorate([
64
- (0, typeorm_1.Column)({
65
- nullable: true,
66
- length: 30
67
- }),
61
+ (0, typeorm_1.Column)({ nullable: true, length: 30 }),
62
+ (0, type_graphql_1.Field)({ nullable: true }),
68
63
  tslib_1.__metadata("design:type", String)
69
64
  ], Cell.prototype, "sideCd", void 0);
70
65
  tslib_1.__decorate([
71
- (0, typeorm_1.Column)({
72
- nullable: true,
73
- width: 10
74
- }),
66
+ (0, typeorm_1.Column)({ nullable: true, width: 10 }),
67
+ (0, type_graphql_1.Field)({ nullable: true }),
75
68
  tslib_1.__metadata("design:type", Number)
76
69
  ], Cell.prototype, "cellSeq", void 0);
77
70
  tslib_1.__decorate([
78
- (0, typeorm_1.Column)({
79
- nullable: true,
80
- length: 30
81
- }),
71
+ (0, typeorm_1.Column)({ nullable: true, length: 30 }),
72
+ (0, type_graphql_1.Field)({ nullable: true }),
82
73
  tslib_1.__metadata("design:type", String)
83
74
  ], Cell.prototype, "printerCd", void 0);
84
75
  tslib_1.__decorate([
85
76
  (0, typeorm_1.Column)({
86
77
  nullable: true
87
78
  }),
79
+ (0, type_graphql_1.Field)({ nullable: true }),
88
80
  tslib_1.__metadata("design:type", Boolean)
89
81
  ], Cell.prototype, "activeFlag", void 0);
82
+ tslib_1.__decorate([
83
+ (0, typeorm_1.Column)({ nullable: true, width: 10 }),
84
+ (0, type_graphql_1.Field)({ nullable: true }),
85
+ tslib_1.__metadata("design:type", String)
86
+ ], Cell.prototype, "status", void 0);
90
87
  tslib_1.__decorate([
91
88
  (0, typeorm_1.Column)({
92
- nullable: true,
93
- width: 10
89
+ nullable: true
94
90
  }),
91
+ (0, type_graphql_1.Field)({ nullable: true }),
95
92
  tslib_1.__metadata("design:type", String)
96
- ], Cell.prototype, "status", void 0);
93
+ ], Cell.prototype, "params", void 0);
97
94
  tslib_1.__decorate([
98
95
  (0, typeorm_1.CreateDateColumn)(),
96
+ (0, type_graphql_1.Field)({ nullable: true }),
99
97
  tslib_1.__metadata("design:type", Date)
100
98
  ], Cell.prototype, "createdAt", void 0);
101
99
  tslib_1.__decorate([
102
100
  (0, typeorm_1.UpdateDateColumn)(),
101
+ (0, type_graphql_1.Field)({ nullable: true }),
103
102
  tslib_1.__metadata("design:type", Date)
104
103
  ], Cell.prototype, "updatedAt", void 0);
105
104
  tslib_1.__decorate([
106
105
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
107
106
  nullable: true
108
107
  }),
109
- tslib_1.__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
108
+ (0, type_graphql_1.Field)({ nullable: true }),
109
+ tslib_1.__metadata("design:type", auth_base_1.User)
110
110
  ], Cell.prototype, "creator", void 0);
111
+ tslib_1.__decorate([
112
+ (0, typeorm_1.RelationId)((cell) => cell.creator),
113
+ tslib_1.__metadata("design:type", String)
114
+ ], Cell.prototype, "creatorId", void 0);
111
115
  tslib_1.__decorate([
112
116
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
113
117
  nullable: true
114
118
  }),
115
- tslib_1.__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
119
+ (0, type_graphql_1.Field)({ nullable: true }),
120
+ tslib_1.__metadata("design:type", auth_base_1.User)
116
121
  ], Cell.prototype, "updater", void 0);
122
+ tslib_1.__decorate([
123
+ (0, typeorm_1.RelationId)((cell) => cell.creator),
124
+ tslib_1.__metadata("design:type", String)
125
+ ], Cell.prototype, "updaterId", void 0);
117
126
  Cell = tslib_1.__decorate([
118
127
  (0, typeorm_1.Entity)(),
119
- (0, typeorm_1.Index)('ix_cell_0', (cell) => [cell.domain, cell.cellCd], { unique: true })
128
+ (0, typeorm_1.Index)('ix_cell_0', (cell) => [cell.domain, cell.cellCd], { unique: true }),
129
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for Cell' })
120
130
  ], Cell);
121
131
  exports.Cell = Cell;
122
132
  //# sourceMappingURL=cell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell.js","sourceRoot":"","sources":["../../../server/service/cell/cell.ts"],"names":[],"mappings":";;;;AAAA,+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BAAS,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;qCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;uCACvB;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;qCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;uCACvB;AA5FP,IAAI;IAHhB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,WAAW,EAAE,CAAC,IAAU,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAChF,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;GAClC,IAAI,CA6FhB;AA7FY,oBAAI","sourcesContent":["import { 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\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\n@Entity()\n@Index('ix_cell_0', (cell: Cell) => [cell.domain, cell.cellCd], { unique: true })\n@ObjectType({ description: 'Entity for Cell' })\nexport class Cell {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((cell: Cell) => cell.domain)\n domainId?: string\n\n @Column({ nullable: true, length: 30 })\n @Field({ nullable: true })\n stationCd: string\n\n @Column({ length: 30 })\n @Field()\n equipCd: string\n\n @Column({ length: 30 })\n @Field()\n cellCd: string\n\n @Column({ length: 30 })\n @Field()\n indCd: string\n\n @Column({ length: 40 })\n @Field()\n channelNo: string\n\n @Column({ length: 40 })\n @Field()\n panNo: string\n\n @Column({ nullable: true, length: 30 })\n @Field({ nullable: true })\n equipZone?: string\n\n @Column({ nullable: true, length: 30 })\n @Field({ nullable: true })\n sideCd?: string\n\n @Column({ nullable: true, width: 10 })\n @Field({ nullable: true })\n cellSeq?: number\n\n @Column({ nullable: true, length: 30 })\n @Field({ nullable: true })\n printerCd?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n activeFlag?: boolean\n\n @Column({ nullable: true, width: 10 })\n @Field({ nullable: true })\n status?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n params?: 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((cell: Cell) => cell.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((cell: Cell) => cell.creator)\n updaterId?: string\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { Cell } from './cell';
2
+ import { CellQuery } from './cell-query';
3
+ import { CellMutation } from './cell-mutation';
4
+ export declare const entities: (typeof Cell)[];
5
+ export declare const resolvers: (typeof CellQuery | typeof CellMutation)[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const cell_1 = require("./cell");
5
+ const cell_query_1 = require("./cell-query");
6
+ const cell_mutation_1 = require("./cell-mutation");
7
+ exports.entities = [cell_1.Cell];
8
+ exports.resolvers = [cell_query_1.CellQuery, cell_mutation_1.CellMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/cell/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,6CAAwC;AACxC,mDAA8C;AAEjC,QAAA,QAAQ,GAAG,CAAC,WAAI,CAAC,CAAA;AACjB,QAAA,SAAS,GAAG,CAAC,sBAAS,EAAE,4BAAY,CAAC,CAAA","sourcesContent":["import { Cell } from './cell'\nimport { CellQuery } from './cell-query'\nimport { CellMutation } from './cell-mutation'\n\nexport const entities = [Cell]\nexport const resolvers = [CellQuery, CellMutation]\n"]}
@@ -0,0 +1,6 @@
1
+ export * from './rack/rack';
2
+ export * from './cell/cell';
3
+ export declare const entities: (typeof import("./rack/rack").Rack | typeof import("./cell/cell").Cell)[];
4
+ export declare const schema: {
5
+ resolverClasses: (typeof import("./rack/rack-query").RackQuery | typeof import("./rack/rack-mutation").RackMutation | typeof import("./cell/cell-query").CellQuery | typeof import("./cell/cell-mutation").CellMutation)[];
6
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.schema = exports.entities = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /* EXPORT ENTITY TYPES */
6
+ tslib_1.__exportStar(require("./rack/rack"), exports);
7
+ tslib_1.__exportStar(require("./cell/cell"), exports);
8
+ /* IMPORT ENTITIES AND RESOLVERS */
9
+ const rack_1 = require("./rack");
10
+ const cell_1 = require("./cell");
11
+ exports.entities = [
12
+ /* ENTITIES */
13
+ ...rack_1.entities,
14
+ ...cell_1.entities,
15
+ ];
16
+ exports.schema = {
17
+ resolverClasses: [
18
+ /* RESOLVER CLASSES */
19
+ ...rack_1.resolvers,
20
+ ...cell_1.resolvers,
21
+ ]
22
+ };
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,sDAA2B;AAC3B,sDAA2B;AAE3B,mCAAmC;AACnC,iCAA6E;AAC7E,iCAA6E;AAEhE,QAAA,QAAQ,GAAG;IACtB,cAAc;IACf,GAAG,eAAY;IACf,GAAG,eAAY;CACf,CAAA;AAGY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACxB,GAAG,gBAAa;QAChB,GAAG,gBAAa;KACf;CACF,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './rack/rack'\nexport * from './cell/cell'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as RackEntities, resolvers as RackResolvers } from './rack'\nimport { entities as CellEntities, resolvers as CellResolvers } from './cell'\n\nexport const entities = [ \n /* ENTITIES */\n\t...RackEntities,\n\t...CellEntities,\n] \n\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n\t\t...RackResolvers,\n\t\t...CellResolvers,\n ] \n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { Rack } from './rack';
2
+ import { RackQuery } from './rack-query';
3
+ import { RackMutation } from './rack-mutation';
4
+ export declare const entities: (typeof Rack)[];
5
+ export declare const resolvers: (typeof RackQuery | typeof RackMutation)[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const rack_1 = require("./rack");
5
+ const rack_query_1 = require("./rack-query");
6
+ const rack_mutation_1 = require("./rack-mutation");
7
+ exports.entities = [rack_1.Rack];
8
+ exports.resolvers = [rack_query_1.RackQuery, rack_mutation_1.RackMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/rack/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,6CAAwC;AACxC,mDAA8C;AAEjC,QAAA,QAAQ,GAAG,CAAC,WAAI,CAAC,CAAA;AACjB,QAAA,SAAS,GAAG,CAAC,sBAAS,EAAE,4BAAY,CAAC,CAAA","sourcesContent":["import { Rack } from './rack'\nimport { RackQuery } from './rack-query'\nimport { RackMutation } from './rack-mutation'\n\nexport const entities = [Rack]\nexport const resolvers = [RackQuery, RackMutation]\n"]}
@@ -0,0 +1,10 @@
1
+ import { Rack } from './rack';
2
+ import { NewRack, RackPatch } from './rack-type';
3
+ export declare class RackMutation {
4
+ createRack(rack: NewRack, context: ResolverContext): Promise<Rack>;
5
+ updateRack(id: string, patch: RackPatch, context: ResolverContext): Promise<Rack>;
6
+ updateMultipleRack(patches: RackPatch[], context: ResolverContext): Promise<Rack[]>;
7
+ deleteRack(id: string, context: ResolverContext): Promise<boolean>;
8
+ deleteRacks(ids: string[], context: ResolverContext): Promise<boolean>;
9
+ importRacks(racks: RackPatch[], context: ResolverContext): Promise<boolean>;
10
+ }
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RackMutation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const typeorm_1 = require("typeorm");
7
+ const attachment_base_1 = require("@things-factory/attachment-base");
8
+ const rack_1 = require("./rack");
9
+ const rack_type_1 = require("./rack-type");
10
+ let RackMutation = class RackMutation {
11
+ async createRack(rack, context) {
12
+ const { domain, user, tx } = context.state;
13
+ return await tx.getRepository(rack_1.Rack).save(Object.assign(Object.assign({}, rack), { domain, creator: user, updater: user }));
14
+ }
15
+ async updateRack(id, patch, context) {
16
+ const { domain, user, tx } = context.state;
17
+ const repository = tx.getRepository(rack_1.Rack);
18
+ const rack = await repository.findOne({
19
+ where: { domain: { id: domain.id }, id }
20
+ });
21
+ return await repository.save(Object.assign(Object.assign(Object.assign({}, rack), patch), { updater: user }));
22
+ }
23
+ async updateMultipleRack(patches, context) {
24
+ const { domain, user, tx } = context.state;
25
+ let results = [];
26
+ const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
27
+ const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
28
+ const rackRepo = tx.getRepository(rack_1.Rack);
29
+ if (_createRecords.length > 0) {
30
+ for (let i = 0; i < _createRecords.length; i++) {
31
+ const newRecord = _createRecords[i];
32
+ const result = await rackRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
33
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
34
+ }
35
+ }
36
+ if (_updateRecords.length > 0) {
37
+ for (let i = 0; i < _updateRecords.length; i++) {
38
+ const updateRecord = _updateRecords[i];
39
+ const rack = await rackRepo.findOneBy({ id: updateRecord.id });
40
+ const result = await rackRepo.save(Object.assign(Object.assign(Object.assign({}, rack), updateRecord), { updater: user }));
41
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
42
+ }
43
+ }
44
+ return results;
45
+ }
46
+ async deleteRack(id, context) {
47
+ const { domain, tx } = context.state;
48
+ await tx.getRepository(rack_1.Rack).delete({ domain: { id: domain.id }, id });
49
+ await (0, attachment_base_1.deleteAttachmentsByRef)(null, { refBys: [id] }, context);
50
+ return true;
51
+ }
52
+ async deleteRacks(ids, context) {
53
+ const { domain, tx } = context.state;
54
+ await tx.getRepository(rack_1.Rack).delete({
55
+ domain: { id: domain.id },
56
+ id: (0, typeorm_1.In)(ids)
57
+ });
58
+ await (0, attachment_base_1.deleteAttachmentsByRef)(null, { refBys: ids }, context);
59
+ return true;
60
+ }
61
+ async importRacks(racks, context) {
62
+ const { domain, tx } = context.state;
63
+ await Promise.all(racks.map(async (rack) => {
64
+ const createdRack = await tx.getRepository(rack_1.Rack).save(Object.assign({ domain }, rack));
65
+ }));
66
+ return true;
67
+ }
68
+ };
69
+ tslib_1.__decorate([
70
+ (0, type_graphql_1.Directive)('@transaction'),
71
+ (0, type_graphql_1.Mutation)(returns => rack_1.Rack, { description: 'To create new Rack' }),
72
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('rack')),
73
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
74
+ tslib_1.__metadata("design:type", Function),
75
+ tslib_1.__metadata("design:paramtypes", [rack_type_1.NewRack, Object]),
76
+ tslib_1.__metadata("design:returntype", Promise)
77
+ ], RackMutation.prototype, "createRack", null);
78
+ tslib_1.__decorate([
79
+ (0, type_graphql_1.Directive)('@transaction'),
80
+ (0, type_graphql_1.Mutation)(returns => rack_1.Rack, { description: 'To modify Rack information' }),
81
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
82
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
83
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
84
+ tslib_1.__metadata("design:type", Function),
85
+ tslib_1.__metadata("design:paramtypes", [String, rack_type_1.RackPatch, Object]),
86
+ tslib_1.__metadata("design:returntype", Promise)
87
+ ], RackMutation.prototype, "updateRack", null);
88
+ tslib_1.__decorate([
89
+ (0, type_graphql_1.Directive)('@transaction'),
90
+ (0, type_graphql_1.Mutation)(returns => [rack_1.Rack], { description: "To modify multiple Racks' information" }),
91
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [rack_type_1.RackPatch])),
92
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
93
+ tslib_1.__metadata("design:type", Function),
94
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
95
+ tslib_1.__metadata("design:returntype", Promise)
96
+ ], RackMutation.prototype, "updateMultipleRack", null);
97
+ tslib_1.__decorate([
98
+ (0, type_graphql_1.Directive)('@transaction'),
99
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete Rack' }),
100
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
101
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
102
+ tslib_1.__metadata("design:type", Function),
103
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
104
+ tslib_1.__metadata("design:returntype", Promise)
105
+ ], RackMutation.prototype, "deleteRack", null);
106
+ tslib_1.__decorate([
107
+ (0, type_graphql_1.Directive)('@transaction'),
108
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple Racks' }),
109
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
110
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
111
+ tslib_1.__metadata("design:type", Function),
112
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
113
+ tslib_1.__metadata("design:returntype", Promise)
114
+ ], RackMutation.prototype, "deleteRacks", null);
115
+ tslib_1.__decorate([
116
+ (0, type_graphql_1.Directive)('@transaction'),
117
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To import multiple Racks' }),
118
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('racks', type => [rack_type_1.RackPatch])),
119
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
120
+ tslib_1.__metadata("design:type", Function),
121
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
122
+ tslib_1.__metadata("design:returntype", Promise)
123
+ ], RackMutation.prototype, "importRacks", null);
124
+ RackMutation = tslib_1.__decorate([
125
+ (0, type_graphql_1.Resolver)(rack_1.Rack)
126
+ ], RackMutation);
127
+ exports.RackMutation = RackMutation;
128
+ //# sourceMappingURL=rack-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rack-mutation.js","sourceRoot":"","sources":["../../../server/service/rack/rack-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,qEAAwE;AAExE,iCAA6B;AAC7B,2CAAgD;AAGhD,IAAa,YAAY,GAAzB,MAAa,YAAY;IAGvB,KAAK,CAAC,UAAU,CAAc,IAAa,EAAS,OAAwB;QAC1E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,M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EAAE,0BAA0B,EAAE,CAAC;IAEvE,mBAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAS,CAAC,CAAC,CAAA;IACjC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;+CAWP;AA1HU,YAAY;IADxB,IAAA,uBAAQ,EAAC,WAAI,CAAC;GACF,YAAY,CA2HxB;AA3HY,oCAAY","sourcesContent":["import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { deleteAttachmentsByRef } from '@things-factory/attachment-base'\n\nimport { Rack } from './rack'\nimport { NewRack, RackPatch } from './rack-type'\n\n@Resolver(Rack)\nexport class RackMutation {\n @Directive('@transaction')\n @Mutation(returns => Rack, { description: 'To create new Rack' })\n async createRack(@Arg('rack') rack: NewRack, @Ctx() context: ResolverContext): Promise<Rack> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(Rack).save({\n ...rack,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Rack, { description: 'To modify Rack information' })\n async updateRack(\n @Arg('id') id: string,\n @Arg('patch') patch: RackPatch,\n @Ctx() context: ResolverContext\n ): Promise<Rack> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Rack)\n const rack = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n return await repository.save({\n ...rack,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Rack], { description: \"To modify multiple Racks' information\" })\n async updateMultipleRack(\n @Arg('patches', type => [RackPatch]) patches: RackPatch[],\n @Ctx() context: ResolverContext\n ): Promise<Rack[]> {\n const { domain, 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 rackRepo = tx.getRepository(Rack)\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 rackRepo.save({\n ...newRecord,\n domain,\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 updateRecord = _updateRecords[i]\n const rack = await rackRepo.findOneBy({ id: updateRecord.id })\n\n const result = await rackRepo.save({\n ...rack,\n ...updateRecord,\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 Rack' })\n async deleteRack(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Rack).delete({ domain: { id: domain.id }, id })\n await deleteAttachmentsByRef(null, { refBys: [id] }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple Racks' })\n async deleteRacks(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Rack).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n await deleteAttachmentsByRef(null, { refBys: ids }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple Racks' })\n async importRacks(\n @Arg('racks', type => [RackPatch]) racks: RackPatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n racks.map(async (rack: RackPatch) => {\n const createdRack: Rack = await tx.getRepository(Rack).save({ domain, ...rack })\n })\n )\n\n return true\n }\n}\n"]}