@things-factory/board-service 5.0.1 → 5.0.11

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 (55) hide show
  1. package/dist-server/controllers/fonts.js.map +1 -1
  2. package/dist-server/controllers/headless-model.js.map +1 -1
  3. package/dist-server/controllers/headless-pool-for-board.js +2 -24
  4. package/dist-server/controllers/headless-pool-for-board.js.map +1 -1
  5. package/dist-server/controllers/headless-pool-for-label.js +3 -32
  6. package/dist-server/controllers/headless-pool-for-label.js.map +1 -1
  7. package/dist-server/controllers/index.js.map +1 -1
  8. package/dist-server/controllers/label-command.js.map +1 -1
  9. package/dist-server/controllers/pdf.js.map +1 -1
  10. package/dist-server/controllers/print.js.map +1 -1
  11. package/dist-server/controllers/screenshot.js.map +1 -1
  12. package/dist-server/controllers/thumbnail.js.map +1 -1
  13. package/dist-server/index.js +4 -17
  14. package/dist-server/index.js.map +1 -1
  15. package/dist-server/migrations/1556862253000-SeedGroup.js.map +1 -1
  16. package/dist-server/migrations/index.js.map +1 -1
  17. package/dist-server/routers/board-print-router.js +2 -4
  18. package/dist-server/routers/board-print-router.js.map +1 -1
  19. package/dist-server/routers/internal-board-view-router.js +2 -4
  20. package/dist-server/routers/internal-board-view-router.js.map +1 -1
  21. package/dist-server/routers/standalone-board-service-router.js +3 -5
  22. package/dist-server/routers/standalone-board-service-router.js.map +1 -1
  23. package/dist-server/routes.js.map +1 -1
  24. package/dist-server/service/board/board-mutation.js +21 -32
  25. package/dist-server/service/board/board-mutation.js.map +1 -1
  26. package/dist-server/service/board/board-query.js +39 -51
  27. package/dist-server/service/board/board-query.js.map +1 -1
  28. package/dist-server/service/board/board-type.js +28 -36
  29. package/dist-server/service/board/board-type.js.map +1 -1
  30. package/dist-server/service/board/board.js +34 -42
  31. package/dist-server/service/board/board.js.map +1 -1
  32. package/dist-server/service/board/index.js.map +1 -1
  33. package/dist-server/service/group/group-mutation.js +28 -39
  34. package/dist-server/service/group/group-mutation.js.map +1 -1
  35. package/dist-server/service/group/group-query.js +34 -45
  36. package/dist-server/service/group/group-query.js.map +1 -1
  37. package/dist-server/service/group/group-type.js +16 -24
  38. package/dist-server/service/group/group-type.js.map +1 -1
  39. package/dist-server/service/group/group.js +26 -34
  40. package/dist-server/service/group/group.js.map +1 -1
  41. package/dist-server/service/group/index.js.map +1 -1
  42. package/dist-server/service/index.js +4 -17
  43. package/dist-server/service/index.js.map +1 -1
  44. package/dist-server/service/play-group/index.js.map +1 -1
  45. package/dist-server/service/play-group/play-group-mutation.js +35 -46
  46. package/dist-server/service/play-group/play-group-mutation.js.map +1 -1
  47. package/dist-server/service/play-group/play-group-query.js +34 -45
  48. package/dist-server/service/play-group/play-group-query.js.map +1 -1
  49. package/dist-server/service/play-group/play-group-type.js +16 -24
  50. package/dist-server/service/play-group/play-group-type.js.map +1 -1
  51. package/dist-server/service/play-group/play-group.js +26 -34
  52. package/dist-server/service/play-group/play-group.js.map +1 -1
  53. package/dist-server/tsconfig.tsbuildinfo +1 -0
  54. package/package.json +4 -4
  55. package/server/service/board/board-query.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"play-group-query.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAAwF;AAExF,0CAAsC;AACtC,6CAAwC;AACxC,uDAAiD;AAGjD,IAAa,cAAc,GAA3B,MAAa,cAAc;IAEzB,KAAK,CAAC,SAAS,CAAY,EAAU,EAAS,OAAY;QACxD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,uBAAa,EAAC,sBAAS,CAAC,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;IACJ,CAAC;IAGD,KAAK,CAAC,UAAU,CAAS,MAAiB,E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D,CAAC;CACF,CAAA;AA7CC;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,sBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;IACpE,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;+CAM5C;AAGD;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,+BAAa,EAAE,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAC/D,WAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAAjB,iBAAS,oBAAT,iBAAS;;gDAazC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,aAAK,CAAC,CAAC;IACjB,WAAA,IAAA,mBAAI,GAAE,CAAA;;;;4CAInB;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAY,sBAAS;;4CAExC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAY,sBAAS;;6CAEzC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAY,sBAAS;;6CAEzC;AA9CU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,sBAAS,CAAC;GACP,cAAc,CA+C1B;AA/CY,wCAAc"}
1
+ {"version":3,"file":"play-group-query.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAAwF;AAExF,0CAAsC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GD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,sBAAS;;6CAEzC;AA9CU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,sBAAS,CAAC;GACP,cAAc,CA+C1B;AA/CY,wCAAc","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\n\nimport { Board } from '../board/board'\nimport { PlayGroup } from './play-group'\nimport { PlayGroupList } from './play-group-type'\n\n@Resolver(PlayGroup)\nexport class PlayGroupQuery {\n @Query(returns => PlayGroup, { nullable: true, description: 'To fetch a PlayGroup' })\n async playGroup(@Arg('id') id: string, @Ctx() context: any): Promise<PlayGroup> {\n const { domain } = context.state\n\n return await getRepository(PlayGroup).findOne({\n where: { domain, id }\n })\n }\n\n @Query(returns => PlayGroupList, { description: 'To fetch multiple PlayGroups' })\n async playGroups(@Args() params: ListParam, @Ctx() context: any): Promise<PlayGroupList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(PlayGroup),\n params,\n domain,\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => [Board])\n async boards(@Root() playGroup) {\n return (await getRepository(PlayGroup).findOne(playGroup.id, { relations: ['boards'] }))?.boards.sort((a, b) =>\n a.name > b.name ? 1 : -1\n )\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() playGroup: PlayGroup) {\n return await getRepository(Domain).findOne(playGroup.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() playGroup: PlayGroup): Promise<User> {\n return await getRepository(User).findOne(playGroup.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() playGroup: PlayGroup): Promise<User> {\n return await getRepository(User).findOne(playGroup.creatorId)\n }\n}\n"]}
@@ -1,56 +1,48 @@
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.PlayGroupList = exports.PlayGroupPatch = exports.NewPlayGroup = void 0;
4
+ const tslib_1 = require("tslib");
13
5
  const type_graphql_1 = require("type-graphql");
14
6
  const play_group_1 = require("./play-group");
15
7
  let NewPlayGroup = class NewPlayGroup {
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
  ], NewPlayGroup.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
  ], NewPlayGroup.prototype, "description", void 0);
25
- NewPlayGroup = __decorate([
17
+ NewPlayGroup = tslib_1.__decorate([
26
18
  (0, type_graphql_1.InputType)()
27
19
  ], NewPlayGroup);
28
20
  exports.NewPlayGroup = NewPlayGroup;
29
21
  let PlayGroupPatch = class PlayGroupPatch {
30
22
  };
31
- __decorate([
23
+ tslib_1.__decorate([
32
24
  (0, type_graphql_1.Field)({ nullable: true }),
33
- __metadata("design:type", String)
25
+ tslib_1.__metadata("design:type", String)
34
26
  ], PlayGroupPatch.prototype, "name", 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
  ], PlayGroupPatch.prototype, "description", void 0);
39
- PlayGroupPatch = __decorate([
31
+ PlayGroupPatch = tslib_1.__decorate([
40
32
  (0, type_graphql_1.InputType)()
41
33
  ], PlayGroupPatch);
42
34
  exports.PlayGroupPatch = PlayGroupPatch;
43
35
  let PlayGroupList = class PlayGroupList {
44
36
  };
45
- __decorate([
37
+ tslib_1.__decorate([
46
38
  (0, type_graphql_1.Field)(type => [play_group_1.PlayGroup]),
47
- __metadata("design:type", Array)
39
+ tslib_1.__metadata("design:type", Array)
48
40
  ], PlayGroupList.prototype, "items", void 0);
49
- __decorate([
41
+ tslib_1.__decorate([
50
42
  (0, type_graphql_1.Field)(type => type_graphql_1.Int),
51
- __metadata("design:type", Number)
43
+ tslib_1.__metadata("design:type", Number)
52
44
  ], PlayGroupList.prototype, "total", void 0);
53
- PlayGroupList = __decorate([
45
+ PlayGroupList = tslib_1.__decorate([
54
46
  (0, type_graphql_1.ObjectType)()
55
47
  ], PlayGroupList);
56
48
  exports.PlayGroupList = PlayGroupList;
@@ -1 +1 @@
1
- {"version":3,"file":"play-group-type.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAsF;AAEtF,6CAAwC;AAGxC,IAAa,YAAY,GAAzB,MAAa,YAAY;CAMxB,CAAA;AAJC;IADC,IAAA,oBAAK,GAAE;;0CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AALT,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAMxB;AANY,oCAAY;AASzB,IAAa,cAAc,GAA3B,MAAa,cAAc;CAM1B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACd;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;AALT,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAM1B;AANY,wCAAc;AAS3B,IAAa,aAAa,GAA1B,MAAa,aAAa;CAMzB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,sBAAS,CAAC,CAAC;;4CACT;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;4CACN;AALF,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB;AANY,sCAAa"}
1
+ {"version":3,"file":"play-group-type.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,6CAAwC;AAGxC,IAAa,YAAY,GAAzB,MAAa,YAAY;CAMxB,CAAA;AAJC;IADC,IAAA,oBAAK,GAAE;;0CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AALT,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAMxB;AANY,oCAAY;AASzB,IAAa,cAAc,GAA3B,MAAa,cAAc;CAM1B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACd;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;AALT,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAM1B;AANY,wCAAc;AAS3B,IAAa,aAAa,GAA1B,MAAa,aAAa;CAMzB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,sBAAS,CAAC,CAAC;;4CACT;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;4CACN;AALF,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB;AANY,sCAAa","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { PlayGroup } from './play-group'\n\n@InputType()\nexport class NewPlayGroup {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n\n@InputType()\nexport class PlayGroupPatch {\n @Field({ nullable: true })\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n\n@ObjectType()\nexport class PlayGroupList {\n @Field(type => [PlayGroup])\n items: PlayGroup[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -1,16 +1,8 @@
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
  var _a, _b, _c;
12
3
  Object.defineProperty(exports, "__esModule", { value: true });
13
4
  exports.PlayGroup = void 0;
5
+ const tslib_1 = require("tslib");
14
6
  const type_graphql_1 = require("type-graphql");
15
7
  const typeorm_1 = require("typeorm");
16
8
  const auth_base_1 = require("@things-factory/auth-base");
@@ -18,71 +10,71 @@ const shell_1 = require("@things-factory/shell");
18
10
  const board_1 = require("../board/board");
19
11
  let PlayGroup = class PlayGroup {
20
12
  };
21
- __decorate([
13
+ tslib_1.__decorate([
22
14
  (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
23
15
  (0, type_graphql_1.Field)(type => type_graphql_1.ID),
24
- __metadata("design:type", String)
16
+ tslib_1.__metadata("design:type", String)
25
17
  ], PlayGroup.prototype, "id", void 0);
26
- __decorate([
18
+ tslib_1.__decorate([
27
19
  (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
28
20
  (0, type_graphql_1.Field)({ nullable: true }),
29
- __metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
21
+ tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
30
22
  ], PlayGroup.prototype, "domain", void 0);
31
- __decorate([
23
+ tslib_1.__decorate([
32
24
  (0, typeorm_1.RelationId)((playGroup) => playGroup.domain),
33
- __metadata("design:type", String)
25
+ tslib_1.__metadata("design:type", String)
34
26
  ], PlayGroup.prototype, "domainId", void 0);
35
- __decorate([
27
+ tslib_1.__decorate([
36
28
  (0, typeorm_1.Column)(),
37
29
  (0, type_graphql_1.Field)(),
38
- __metadata("design:type", String)
30
+ tslib_1.__metadata("design:type", String)
39
31
  ], PlayGroup.prototype, "name", void 0);
40
- __decorate([
32
+ tslib_1.__decorate([
41
33
  (0, typeorm_1.Column)({
42
34
  nullable: true
43
35
  }),
44
36
  (0, type_graphql_1.Field)({ nullable: true }),
45
- __metadata("design:type", String)
37
+ tslib_1.__metadata("design:type", String)
46
38
  ], PlayGroup.prototype, "description", void 0);
47
- __decorate([
39
+ tslib_1.__decorate([
48
40
  (0, typeorm_1.ManyToMany)(type => board_1.Board, board => board.playGroups),
49
41
  (0, typeorm_1.JoinTable)({ name: 'play_groups_boards' }),
50
42
  (0, type_graphql_1.Field)(type => [board_1.Board], { nullable: true }),
51
- __metadata("design:type", Array)
43
+ tslib_1.__metadata("design:type", Array)
52
44
  ], PlayGroup.prototype, "boards", void 0);
53
- __decorate([
45
+ tslib_1.__decorate([
54
46
  (0, typeorm_1.CreateDateColumn)(),
55
47
  (0, type_graphql_1.Field)({ nullable: true }),
56
- __metadata("design:type", Date)
48
+ tslib_1.__metadata("design:type", Date)
57
49
  ], PlayGroup.prototype, "createdAt", void 0);
58
- __decorate([
50
+ tslib_1.__decorate([
59
51
  (0, typeorm_1.UpdateDateColumn)(),
60
52
  (0, type_graphql_1.Field)({ nullable: true }),
61
- __metadata("design:type", Date)
53
+ tslib_1.__metadata("design:type", Date)
62
54
  ], PlayGroup.prototype, "updatedAt", void 0);
63
- __decorate([
55
+ tslib_1.__decorate([
64
56
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
65
57
  nullable: true
66
58
  }),
67
59
  (0, type_graphql_1.Field)({ nullable: true }),
68
- __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
60
+ tslib_1.__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
69
61
  ], PlayGroup.prototype, "creator", void 0);
70
- __decorate([
62
+ tslib_1.__decorate([
71
63
  (0, typeorm_1.RelationId)((playGroup) => playGroup.creator),
72
- __metadata("design:type", String)
64
+ tslib_1.__metadata("design:type", String)
73
65
  ], PlayGroup.prototype, "creatorId", void 0);
74
- __decorate([
66
+ tslib_1.__decorate([
75
67
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
76
68
  nullable: true
77
69
  }),
78
70
  (0, type_graphql_1.Field)({ nullable: true }),
79
- __metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
71
+ tslib_1.__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
80
72
  ], PlayGroup.prototype, "updater", void 0);
81
- __decorate([
73
+ tslib_1.__decorate([
82
74
  (0, typeorm_1.RelationId)((playGroup) => playGroup.creator),
83
- __metadata("design:type", String)
75
+ tslib_1.__metadata("design:type", String)
84
76
  ], PlayGroup.prototype, "updaterId", void 0);
85
- PlayGroup = __decorate([
77
+ PlayGroup = tslib_1.__decorate([
86
78
  (0, typeorm_1.Entity)(),
87
79
  (0, typeorm_1.Index)('ix_play_group_0', (playGroup) => [playGroup.domain, playGroup.name], { unique: true }),
88
80
  (0, type_graphql_1.ObjectType)({ description: 'Entity for Board PlayGroup' })
@@ -1 +1 @@
1
- {"version":3,"file":"play-group.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAoD;AACpD,qCAWgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,0CAAsC;AAKtC,IAAa,SAAS,GAAtB,MAAa,SAAS;CAoDrB,CAAA;AAjDC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;qCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACjB,cAAM,oBAAN,cAAM;yCAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC;;2CACtC;AAIjB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;uCACI;AAMZ;IAJC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACN;AAKpB;IAHC,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE,CAAC,aAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC;IACpD,IAAA,mBAAS,EAAC,EAAE,IAAI,EAAE,oBAAoB,EA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B;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;4CAAA;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;0DAChB,gBAAI,oBAAJ,gBAAI;0CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;4CACtC;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;0DAChB,gBAAI,oBAAJ,gBAAI;0CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;4CACtC;AAnDP,SAAS;IAHrB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,iBAAiB,EAAE,CAAC,SAAoB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACxG,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;GAC7C,SAAS,CAoDrB;AApDY,8BAAS","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n JoinTable,\n ManyToMany,\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\nimport { Board } from '../board/board'\n\n@Entity()\n@Index('ix_play_group_0', (playGroup: PlayGroup) => [playGroup.domain, playGroup.name], { unique: true })\n@ObjectType({ description: 'Entity for Board PlayGroup' })\nexport class PlayGroup {\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((playGroup: PlayGroup) => playGroup.domain)\n domainId?: 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 @ManyToMany(type => Board, board => board.playGroups)\n @JoinTable({ name: 'play_groups_boards' })\n @Field(type => [Board], { nullable: true })\n boards: Board[]\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((playGroup: PlayGroup) => playGroup.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((playGroup: PlayGroup) => playGroup.creator)\n updaterId?: string\n}\n"]}