namirasoft-field-node 1.3.22 → 1.4.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 (43) hide show
  1. package/dist/controller/entity_category/List.js +1 -1
  2. package/dist/controller/entity_category/List.js.map +1 -1
  3. package/dist/controller/entity_category/Update.d.ts +22 -0
  4. package/dist/controller/entity_category/Update.js +68 -0
  5. package/dist/controller/entity_category/Update.js.map +1 -0
  6. package/dist/controller/entity_field/List.js +1 -1
  7. package/dist/controller/entity_field/List.js.map +1 -1
  8. package/dist/controller/entity_tag/List.js +1 -1
  9. package/dist/controller/entity_tag/List.js.map +1 -1
  10. package/package.json +28 -28
  11. package/src/NSFApplication.ts +42 -42
  12. package/src/controller/BaseEntityFieldController.ts +22 -22
  13. package/src/controller/BaseEntityFieldControllerProps.ts +4 -4
  14. package/src/controller/BaseEntityFieldControllerState.ts +4 -4
  15. package/src/controller/NSFListController.ts +39 -39
  16. package/src/controller/entity_category/Create.ts +52 -52
  17. package/src/controller/entity_category/Delete.ts +49 -49
  18. package/src/controller/entity_category/Get.ts +51 -51
  19. package/src/controller/entity_category/List.ts +58 -58
  20. package/src/controller/entity_field/Create.ts +53 -53
  21. package/src/controller/entity_field/Delete.ts +49 -49
  22. package/src/controller/entity_field/Get.ts +51 -51
  23. package/src/controller/entity_field/List.ts +58 -58
  24. package/src/controller/entity_field/Update.ts +55 -55
  25. package/src/controller/entity_tag/Create.ts +53 -53
  26. package/src/controller/entity_tag/Delete.ts +49 -49
  27. package/src/controller/entity_tag/Get.ts +51 -51
  28. package/src/controller/entity_tag/List.ts +58 -58
  29. package/src/controller/entity_tag/Update.ts +55 -55
  30. package/src/database/FieldDatabaseTables.ts +45 -45
  31. package/src/database/attributes/EntityCategoryAttributes.ts +11 -11
  32. package/src/database/attributes/EntityFieldAttributes.ts +13 -13
  33. package/src/database/attributes/EntityTagAttributes.ts +13 -13
  34. package/src/database/model/EntityCategoryModel.ts +8 -8
  35. package/src/database/model/EntityFieldModel.ts +10 -10
  36. package/src/database/model/EntityTagModel.ts +10 -10
  37. package/src/database/table/EntityCategoryTable.ts +60 -60
  38. package/src/database/table/EntityFieldTable.ts +65 -65
  39. package/src/database/table/EntityTagTable.ts +65 -65
  40. package/src/enum/EntityCategoryNames.ts +3 -3
  41. package/src/enum/EntityFieldNames.ts +3 -3
  42. package/src/enum/EntityTagNames.ts +3 -3
  43. package/src/index.ts +2 -2
@@ -63,7 +63,7 @@ class List extends BaseEntityFieldController_1.BaseEntityFieldController {
63
63
  return yield this.tables.entity_category.list({
64
64
  user_id: q.user_id,
65
65
  [sequelize_1.Op.and]: conditions["entity_category"]
66
- }, q.page, q.size, {}, null);
66
+ }, q.page, q.size, q.sorts, {}, null);
67
67
  });
68
68
  }
69
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/controller/entity_category/List.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAA+B;AAC/B,qDAA6C;AAC7C,4EAAyE;AAEzE,qEAAwF;AAExF,MAAa,IAAK,SAAQ,qDAAyE;IAEzF,OAAO;QAEf,OAAO;YACN,IAAI,EAAE,MAAM;YACZ,GAAG,EAAE,IAAI,CAAC,SAAS,GAAG,UAAU;YAChC,MAAM,EAAE,4BAAU,CAAC,GAAG;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,GAAG,gBAAgB;YACxC,OAAO,EAAE,eAAe,IAAI,CAAC,UAAU,gBAAgB;SACvD,CAAC;IACH,CAAC;IACc,mBAAmB;;YAEjC,OAAO,EAAE,CAAC;QACX,CAAC;KAAA;IACc,gBAAgB;;YAE9B,OAAO,2CAAiB,CAAC,gBAAgB,EAAE,CAAC;QAC7C,CAAC;KAAA;IACc,aAAa;;YAE3B,OAAO,IAAI,CAAC;QACb,CAAC;KAAA;IACc,eAAe;;YAE7B,OAAO,2CAAiB,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,oBA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 import { BaseVariableSchema } from "namirasoft-schema";
4
+ export declare class Update extends BaseEntityFieldController<string> {
5
+ getInfo(): {
6
+ name: string;
7
+ tag: string;
8
+ method: HTTPMethod;
9
+ path: string;
10
+ summary: string;
11
+ };
12
+ getParametersSchema(): Promise<BaseVariableSchema[]>;
13
+ getQueriesSchema(): Promise<never[]>;
14
+ getBodySchema(): Promise<import("namirasoft-schema").ObjectSchema>;
15
+ getOutputSchema(): Promise<import("namirasoft-schema").ObjectSchema>;
16
+ getState(): Promise<{
17
+ check_auth: boolean;
18
+ auth_optional: boolean;
19
+ }>;
20
+ protected getID(): string | null;
21
+ handle(): Promise<any>;
22
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Update = void 0;
13
+ const namirasoft_core_1 = require("namirasoft-core");
14
+ const BaseEntityFieldController_1 = require("../BaseEntityFieldController");
15
+ const namirasoft_schema_1 = require("namirasoft-schema");
16
+ const EntityCategoryNames_1 = require("../../enum/EntityCategoryNames");
17
+ class Update extends BaseEntityFieldController_1.BaseEntityFieldController {
18
+ getInfo() {
19
+ return {
20
+ name: "Update",
21
+ tag: this.tagPrefix + "Category",
22
+ method: namirasoft_core_1.HTTPMethod.PUT,
23
+ path: this.pathPrefix + "/category/{id}",
24
+ summary: `Updates a ${this.namePrefix} category by an id`
25
+ };
26
+ }
27
+ getParametersSchema() {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ return [new namirasoft_schema_1.BaseVariableSchema("id", new namirasoft_schema_1.StringSchema(true))];
30
+ });
31
+ }
32
+ getQueriesSchema() {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ return [];
35
+ });
36
+ }
37
+ getBodySchema() {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ return this.tables.entity_category.getSchemaByName(true, EntityCategoryNames_1.EntityCategoryNames.EntityCategoryInput);
40
+ });
41
+ }
42
+ getOutputSchema() {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ return this.tables.entity_category.getSchemaByName(true);
45
+ });
46
+ }
47
+ getState() {
48
+ return __awaiter(this, void 0, void 0, function* () {
49
+ return {
50
+ check_auth: true,
51
+ auth_optional: false
52
+ };
53
+ });
54
+ }
55
+ getID() {
56
+ return new namirasoft_core_1.ObjectService(this.req.params.id).getString();
57
+ }
58
+ handle() {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ let id = new namirasoft_core_1.ObjectService(this.req.params.id).getString();
61
+ let category_id = new namirasoft_core_1.ObjectService(this.req.body.category_id).getString();
62
+ let ans = yield this.tables.entity_category.update(this.props.access, this.props.session, this.props.access.owner_id, id, category_id, null);
63
+ return yield this.tables.entity_category.secure(ans);
64
+ });
65
+ }
66
+ }
67
+ exports.Update = Update;
68
+ //# sourceMappingURL=Update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../src/controller/entity_category/Update.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4D;AAC5D,4EAAyE;AACzE,yDAAqE;AACrE,wEAAqE;AACrE,MAAa,MAAO,SAAQ,qDAAiC;IAEnD,OAAO;QAEf,OAAO;YACN,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,IAAI,CAAC,SAAS,GAAG,UAAU;YAChC,MAAM,EAAE,4BAAU,CAAC,GAAG;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,GAAG,gBAAgB;YACxC,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AC7I,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACtD,CAAC;KAAA;CACD;AAhDD,wBAgDC"}
@@ -63,7 +63,7 @@ class List extends BaseEntityFieldController_1.BaseEntityFieldController {
63
63
  return yield this.tables.entity_field.list({
64
64
  user_id: q.user_id,
65
65
  [sequelize_1.Op.and]: conditions["entity_field"]
66
- }, q.page, q.size, {}, null);
66
+ }, q.page, q.size, q.sorts, {}, null);
67
67
  });
68
68
  }
69
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/controller/entity_field/List.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAA+B;AAC/B,qDAA6C;AAC7C,4EAAyE;AAEzE,qEAAwF;AAExF,MAAa,IAAK,SAAQ,qDAAsE;IAEtF,OAAO;QAEf,OAAO;YACN,IAAI,EAAE,MAAM;YACZ,GAAG,EAAE,IAAI,CAAC,SAAS,GAAG,OAAO;YAC7B,MAAM,EAAE,4BAAU,CAAC,GAAG;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,GAAG,aAAa;YACrC,OAAO,EAAE,eAAe,IAAI,CAAC,UAAU,aAAa;SACpD,CAAC;IACH,CAAC;IACc,mBAAmB;;YAEjC,OAAO,EAAE,CAAC;QACX,CAAC;KAAA;IACc,gBAAgB;;YAE9B,OAAO,2CAAiB,CAAC,gBAAgB,EAAE,CAAC;QAC7C,CAAC;KAAA;IACc,aAAa;;YAE3B,OAAO,IAAI,CAAC;QACb,CAAC;KAAA;IACc,eAAe;;YAE7B,OAAO,2CAAiB,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/F,CAAC;KAAA;IACc,QAAQ;;YAEtB,OAAO;gBACN,UAAU,EAAE,IAAI;gBAChB,aAAa,EAAE,KAAK;aACpB,CAAC;QACH,CAAC;KAAA;I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AAa;;YAE3B,OAAO,IAAI,CAAC;QACb,CAAC;KAAA;IACc,eAAe;;YAE7B,OAAO,2CAAiB,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/F,CAAC;KAAA;IACc,QAAQ;;YAEtB,OAAO;gBACN,UAAU,EAAE,IAAI;gBAChB,aAAa,EAAE,KAAK;aACpB,CAAC;QACH,CAAC;KAAA;IACQ,KAAK;QAEb,OAAO,IAAI,CAAC;IACb,CAAC;IACc,MAAM;;YAEpB,IAAI,MAAM,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;YAElC,IAAI,CAAC,GAA+B,2CAAiB,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAE1G,IAAI,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;YAEvE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC;gBAC1C,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,CAAC,cAAE,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC;aACpC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QACvC,CAAC;KAAA;CACD;AApDD,oBAoDC"}
@@ -63,7 +63,7 @@ class List extends BaseEntityFieldController_1.BaseEntityFieldController {
63
63
  return yield this.tables.entity_tag.list({
64
64
  user_id: q.user_id,
65
65
  [sequelize_1.Op.and]: conditions["entity_tag"]
66
- }, q.page, q.size, {}, null);
66
+ }, q.page, q.size, q.sorts, {}, null);
67
67
  });
68
68
  }
69
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sourceRo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AAG,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;YAEhC,IAAI,CAAC,GAA+B,2CAAiB,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAE1G,IAAI,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;YAEvE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;gBACxC,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,CAAC,cAAE,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC;aAClC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QACvC,CAAC;KAAA;CACD;AApDD,oBAoDC"}
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
- {
2
- "name": "namirasoft-field-node",
3
- "title": "Namirasoft Field Node NPM Package",
4
- "description": "Namira Software Corporation Field Node NPM Package",
5
- "icon": "logo.png",
6
- "logo": "https://static.namirasoft.com/image/namirasoft/field/logo/base.png",
7
- "language": "ts",
8
- "framework": "npm",
9
- "application": "package",
10
- "private": false,
11
- "version": "1.3.22",
12
- "author": "Amir Abolhasani",
13
- "license": "MIT",
14
- "main": "./dist/index.js",
15
- "types": "./dist/index.d.ts",
16
- "scripts": {
17
- "build": ""
18
- },
19
- "dependencies": {
20
- "namirasoft-access": "^1.4.9",
21
- "namirasoft-account-node": "^1.4.31",
22
- "namirasoft-core": "^1.4.12",
23
- "namirasoft-node": "^1.4.12",
24
- "namirasoft-node-mysql": "^1.4.3"
25
- },
26
- "bin": {
27
- "ns-field": "./dist/command/cli.js"
28
- }
1
+ {
2
+ "name": "namirasoft-field-node",
3
+ "title": "Namirasoft Field Node NPM Package",
4
+ "description": "Namira Software Corporation Field Node NPM Package",
5
+ "icon": "logo.png",
6
+ "logo": "https://static.namirasoft.com/image/namirasoft/field/logo/base.png",
7
+ "language": "ts",
8
+ "framework": "npm",
9
+ "application": "package",
10
+ "private": false,
11
+ "version": "1.4.0",
12
+ "author": "Amir Abolhasani",
13
+ "license": "MIT",
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "scripts": {
17
+ "build": ""
18
+ },
19
+ "dependencies": {
20
+ "namirasoft-access": "^1.4.18",
21
+ "namirasoft-account-node": "^1.4.37",
22
+ "namirasoft-core": "^1.4.14",
23
+ "namirasoft-node": "^1.4.16",
24
+ "namirasoft-node-mysql": "^1.4.6"
25
+ },
26
+ "bin": {
27
+ "ns-field": "./dist/command/cli.js"
28
+ }
29
29
  }
@@ -1,43 +1,43 @@
1
- import express from 'express';
2
- import { NSABaseApplication } from 'namirasoft-account-node';
3
- import { BaseMySqlDatabase } from 'namirasoft-node-mysql';
4
- import { FieldDatabaseTables } from './database/FieldDatabaseTables';
5
- import { Create as EntityCategoryCreate } from './controller/entity_category/Create';
6
- import { Delete as EntityCategoryDelete } from './controller/entity_category/Delete';
7
- import { Get as EntityCategoryGet } from './controller/entity_category/Get';
8
- import { List as EntityCategoryList } from './controller/entity_category/List';
9
- import { Create as EntityFieldCreate } from './controller/entity_field/Create';
10
- import { Delete as EntityFieldDelete } from './controller/entity_field/Delete';
11
- import { Get as EntityFieldGet } from './controller/entity_field/Get';
12
- import { List as EntityFieldList } from './controller/entity_field/List';
13
- import { Update as EntityFieldUpdate } from './controller/entity_field/Update';
14
- import { Create as EntityTagCreate } from './controller/entity_tag/Create';
15
- import { Delete as EntityTagDelete } from './controller/entity_tag/Delete';
16
- import { Get as EntityTagGet } from './controller/entity_tag/Get';
17
- import { List as EntityTagList } from './controller/entity_tag/List';
18
- import { Update as EntityTagUpdate } from './controller/entity_tag/Update';
19
-
20
- export class NSFApplication
21
- {
22
- static getControllers(tables: FieldDatabaseTables<BaseMySqlDatabase>): ((app: NSABaseApplication<BaseMySqlDatabase>, req: express.Request, res: express.Response) => any)[]
23
- {
24
- return [
25
- (app, req, res) => new EntityCategoryList(app, req, res, tables),
26
- (app, req, res) => new EntityCategoryGet(app, req, res, tables),
27
- (app, req, res) => new EntityCategoryCreate(app, req, res, tables),
28
- (app, req, res) => new EntityCategoryDelete(app, req, res, tables),
29
-
30
- (app, req, res) => new EntityFieldList(app, req, res, tables),
31
- (app, req, res) => new EntityFieldGet(app, req, res, tables),
32
- (app, req, res) => new EntityFieldCreate(app, req, res, tables),
33
- (app, req, res) => new EntityFieldUpdate(app, req, res, tables),
34
- (app, req, res) => new EntityFieldDelete(app, req, res, tables),
35
-
36
- (app, req, res) => new EntityTagList(app, req, res, tables),
37
- (app, req, res) => new EntityTagGet(app, req, res, tables),
38
- (app, req, res) => new EntityTagCreate(app, req, res, tables),
39
- (app, req, res) => new EntityTagUpdate(app, req, res, tables),
40
- (app, req, res) => new EntityTagDelete(app, req, res, tables),
41
- ];
42
- }
1
+ import express from 'express';
2
+ import { NSABaseApplication } from 'namirasoft-account-node';
3
+ import { BaseMySqlDatabase } from 'namirasoft-node-mysql';
4
+ import { FieldDatabaseTables } from './database/FieldDatabaseTables';
5
+ import { Create as EntityCategoryCreate } from './controller/entity_category/Create';
6
+ import { Delete as EntityCategoryDelete } from './controller/entity_category/Delete';
7
+ import { Get as EntityCategoryGet } from './controller/entity_category/Get';
8
+ import { List as EntityCategoryList } from './controller/entity_category/List';
9
+ import { Create as EntityFieldCreate } from './controller/entity_field/Create';
10
+ import { Delete as EntityFieldDelete } from './controller/entity_field/Delete';
11
+ import { Get as EntityFieldGet } from './controller/entity_field/Get';
12
+ import { List as EntityFieldList } from './controller/entity_field/List';
13
+ import { Update as EntityFieldUpdate } from './controller/entity_field/Update';
14
+ import { Create as EntityTagCreate } from './controller/entity_tag/Create';
15
+ import { Delete as EntityTagDelete } from './controller/entity_tag/Delete';
16
+ import { Get as EntityTagGet } from './controller/entity_tag/Get';
17
+ import { List as EntityTagList } from './controller/entity_tag/List';
18
+ import { Update as EntityTagUpdate } from './controller/entity_tag/Update';
19
+
20
+ export class NSFApplication
21
+ {
22
+ static getControllers(tables: FieldDatabaseTables<BaseMySqlDatabase>): ((app: NSABaseApplication<BaseMySqlDatabase>, req: express.Request, res: express.Response) => any)[]
23
+ {
24
+ return [
25
+ (app, req, res) => new EntityCategoryList(app, req, res, tables),
26
+ (app, req, res) => new EntityCategoryGet(app, req, res, tables),
27
+ (app, req, res) => new EntityCategoryCreate(app, req, res, tables),
28
+ (app, req, res) => new EntityCategoryDelete(app, req, res, tables),
29
+
30
+ (app, req, res) => new EntityFieldList(app, req, res, tables),
31
+ (app, req, res) => new EntityFieldGet(app, req, res, tables),
32
+ (app, req, res) => new EntityFieldCreate(app, req, res, tables),
33
+ (app, req, res) => new EntityFieldUpdate(app, req, res, tables),
34
+ (app, req, res) => new EntityFieldDelete(app, req, res, tables),
35
+
36
+ (app, req, res) => new EntityTagList(app, req, res, tables),
37
+ (app, req, res) => new EntityTagGet(app, req, res, tables),
38
+ (app, req, res) => new EntityTagCreate(app, req, res, tables),
39
+ (app, req, res) => new EntityTagUpdate(app, req, res, tables),
40
+ (app, req, res) => new EntityTagDelete(app, req, res, tables),
41
+ ];
42
+ }
43
43
  }
@@ -1,23 +1,23 @@
1
- import { NSABaseApplication, NSABaseController } from "namirasoft-account-node";
2
- import { BaseEntityFieldControllerState } from "./BaseEntityFieldControllerState";
3
- import { BaseEntityFieldControllerProps } from "./BaseEntityFieldControllerProps";
4
- import { BaseMySqlDatabase } from "namirasoft-node-mysql";
5
- import express from "express";
6
- import { FieldDatabaseTables } from "../database/FieldDatabaseTables";
7
- import { NamingConvention } from "namirasoft-core";
8
-
9
- export abstract class BaseEntityFieldController<Output> extends NSABaseController<BaseMySqlDatabase, BaseEntityFieldControllerState, BaseEntityFieldControllerProps, Output>
10
- {
11
- protected tables: FieldDatabaseTables<BaseMySqlDatabase>;
12
- protected tagPrefix: string;
13
- protected pathPrefix: string;
14
- protected namePrefix: string;
15
- constructor(app: NSABaseApplication<BaseMySqlDatabase>, req: express.Request, res: express.Response, tables: FieldDatabaseTables<BaseMySqlDatabase>)
16
- {
17
- super(app, req, res)
18
- this.tables = tables;
19
- this.tagPrefix = NamingConvention.lower_case_underscore.convert(this.tables.name, NamingConvention.Pascal_Case);
20
- this.pathPrefix = this.tables.name.replace(/_/gm, "/");
21
- this.namePrefix = this.tables.name.replace(/_/gm, " ");
22
- }
1
+ import { NSABaseApplication, NSABaseController } from "namirasoft-account-node";
2
+ import { BaseEntityFieldControllerState } from "./BaseEntityFieldControllerState";
3
+ import { BaseEntityFieldControllerProps } from "./BaseEntityFieldControllerProps";
4
+ import { BaseMySqlDatabase } from "namirasoft-node-mysql";
5
+ import express from "express";
6
+ import { FieldDatabaseTables } from "../database/FieldDatabaseTables";
7
+ import { NamingConvention } from "namirasoft-core";
8
+
9
+ export abstract class BaseEntityFieldController<Output> extends NSABaseController<BaseMySqlDatabase, BaseEntityFieldControllerState, BaseEntityFieldControllerProps, Output>
10
+ {
11
+ protected tables: FieldDatabaseTables<BaseMySqlDatabase>;
12
+ protected tagPrefix: string;
13
+ protected pathPrefix: string;
14
+ protected namePrefix: string;
15
+ constructor(app: NSABaseApplication<BaseMySqlDatabase>, req: express.Request, res: express.Response, tables: FieldDatabaseTables<BaseMySqlDatabase>)
16
+ {
17
+ super(app, req, res)
18
+ this.tables = tables;
19
+ this.tagPrefix = NamingConvention.lower_case_underscore.convert(this.tables.name, NamingConvention.Pascal_Case);
20
+ this.pathPrefix = this.tables.name.replace(/_/gm, "/");
21
+ this.namePrefix = this.tables.name.replace(/_/gm, " ");
22
+ }
23
23
  }
@@ -1,5 +1,5 @@
1
- import { NSABaseControllerProps } from "namirasoft-account-node";
2
-
3
- export interface BaseEntityFieldControllerProps extends NSABaseControllerProps
4
- {
1
+ import { NSABaseControllerProps } from "namirasoft-account-node";
2
+
3
+ export interface BaseEntityFieldControllerProps extends NSABaseControllerProps
4
+ {
5
5
  }
@@ -1,5 +1,5 @@
1
- import { NSABaseControllerState } from "namirasoft-account-node";
2
-
3
- export interface BaseEntityFieldControllerState extends NSABaseControllerState
4
- {
1
+ import { NSABaseControllerState } from "namirasoft-account-node";
2
+
3
+ export interface BaseEntityFieldControllerState extends NSABaseControllerState
4
+ {
5
5
  }
@@ -1,40 +1,40 @@
1
- import { Op } from "sequelize";
2
- import { Includeable, WhereOptions } from "sequelize";
3
- import { FieldDatabaseTables } from "../database/FieldDatabaseTables";
4
- import { BaseMySqlDatabase } from "namirasoft-node-mysql";
5
-
6
- export class NSFListController
7
- {
8
- static handle_getTables(name: string, tables: { [table: string]: string[]; }): { [table: string]: string[]; }
9
- {
10
- let ans = { ...tables };
11
- ans[name] = [];
12
- ans[`${name}_category`] = [`${name}.id`, `${name}_category.entity_id`];
13
- ans[`${name}_field`] = [`${name}.id`, `${name}_field.entity_id`];
14
- ans[`${name}_tag`] = [`${name}.id`, `${name}_tag.entity_id`];
15
- return ans;
16
- }
17
- static handle_getIncludes<D extends BaseMySqlDatabase>(name: string, includes: Includeable[], conditions: { [table: string]: WhereOptions[]; }, tables: FieldDatabaseTables<D>): Includeable[]
18
- {
19
- let ans = [...includes];
20
- if (conditions[`${name}_category`].length > 0)
21
- ans.push({
22
- model: tables.entity_category.model,
23
- attributes: [],
24
- where: { [Op.and]: conditions[`${name}_category`] }
25
- });
26
- if (conditions[`${name}_field`].length > 0)
27
- ans.push({
28
- model: tables.entity_field.model,
29
- attributes: [],
30
- where: { [Op.and]: conditions[`${name}_field`] }
31
- });
32
- if (conditions[`${name}_tag`].length > 0)
33
- ans.push({
34
- model: tables.entity_tag.model,
35
- attributes: [],
36
- where: { [Op.and]: conditions[`${name}_tag`] }
37
- });
38
- return ans;
39
- }
1
+ import { Op } from "sequelize";
2
+ import { Includeable, WhereOptions } from "sequelize";
3
+ import { FieldDatabaseTables } from "../database/FieldDatabaseTables";
4
+ import { BaseMySqlDatabase } from "namirasoft-node-mysql";
5
+
6
+ export class NSFListController
7
+ {
8
+ static handle_getTables(name: string, tables: { [table: string]: string[]; }): { [table: string]: string[]; }
9
+ {
10
+ let ans = { ...tables };
11
+ ans[name] = [];
12
+ ans[`${name}_category`] = [`${name}.id`, `${name}_category.entity_id`];
13
+ ans[`${name}_field`] = [`${name}.id`, `${name}_field.entity_id`];
14
+ ans[`${name}_tag`] = [`${name}.id`, `${name}_tag.entity_id`];
15
+ return ans;
16
+ }
17
+ static handle_getIncludes<D extends BaseMySqlDatabase>(name: string, includes: Includeable[], conditions: { [table: string]: WhereOptions[]; }, tables: FieldDatabaseTables<D>): Includeable[]
18
+ {
19
+ let ans = [...includes];
20
+ if (conditions[`${name}_category`].length > 0)
21
+ ans.push({
22
+ model: tables.entity_category.model,
23
+ attributes: [],
24
+ where: { [Op.and]: conditions[`${name}_category`] }
25
+ });
26
+ if (conditions[`${name}_field`].length > 0)
27
+ ans.push({
28
+ model: tables.entity_field.model,
29
+ attributes: [],
30
+ where: { [Op.and]: conditions[`${name}_field`] }
31
+ });
32
+ if (conditions[`${name}_tag`].length > 0)
33
+ ans.push({
34
+ model: tables.entity_tag.model,
35
+ attributes: [],
36
+ where: { [Op.and]: conditions[`${name}_tag`] }
37
+ });
38
+ return ans;
39
+ }
40
40
  }
@@ -1,53 +1,53 @@
1
- import { HTTPMethod, ObjectService } from "namirasoft-core";
2
- import { EntityCategoryModel } from "../../database/model/EntityCategoryModel";
3
- import { BaseEntityFieldController } from "../BaseEntityFieldController";
4
- import { EntityCategoryNames } from "../../enum/EntityCategoryNames";
5
-
6
- export class Create extends BaseEntityFieldController<EntityCategoryModel>
7
- {
8
- override getInfo()
9
- {
10
- return {
11
- name: "Create",
12
- tag: this.tagPrefix + "Category",
13
- method: HTTPMethod.POST,
14
- path: this.pathPrefix + "/category",
15
- summary: `Creates a new ${this.namePrefix} category`
16
- };
17
- }
18
- override async getParametersSchema()
19
- {
20
- return [];
21
- }
22
- override async getQueriesSchema()
23
- {
24
- return [];
25
- }
26
- override async getBodySchema()
27
- {
28
- return this.tables.entity_category.getSchemaByName(true, EntityCategoryNames.EntityCategoryInput);
29
- }
30
- override async getOutputSchema()
31
- {
32
- return this.tables.entity_category.getSchemaByName(true);
33
- }
34
- override async getState()
35
- {
36
- return {
37
- check_auth: true,
38
- auth_optional: false
39
- };
40
- }
41
- override getID()
42
- {
43
- return null;
44
- }
45
- override async handle()
46
- {
47
- let entity_id = new ObjectService(this.req.body.entity_id).getString();
48
- let category_id = new ObjectService(this.req.body.category_id).getString();
49
-
50
- let ans = await this.tables.entity_category.create(this.props.access, this.props.session, this.props.access.owner_id, entity_id, category_id, null);
51
- return await this.tables.entity_category.secure(ans);
52
- }
1
+ import { HTTPMethod, ObjectService } from "namirasoft-core";
2
+ import { EntityCategoryModel } from "../../database/model/EntityCategoryModel";
3
+ import { BaseEntityFieldController } from "../BaseEntityFieldController";
4
+ import { EntityCategoryNames } from "../../enum/EntityCategoryNames";
5
+
6
+ export class Create extends BaseEntityFieldController<EntityCategoryModel>
7
+ {
8
+ override getInfo()
9
+ {
10
+ return {
11
+ name: "Create",
12
+ tag: this.tagPrefix + "Category",
13
+ method: HTTPMethod.POST,
14
+ path: this.pathPrefix + "/category",
15
+ summary: `Creates a new ${this.namePrefix} category`
16
+ };
17
+ }
18
+ override async getParametersSchema()
19
+ {
20
+ return [];
21
+ }
22
+ override async getQueriesSchema()
23
+ {
24
+ return [];
25
+ }
26
+ override async getBodySchema()
27
+ {
28
+ return this.tables.entity_category.getSchemaByName(true, EntityCategoryNames.EntityCategoryInput);
29
+ }
30
+ override async getOutputSchema()
31
+ {
32
+ return this.tables.entity_category.getSchemaByName(true);
33
+ }
34
+ override async getState()
35
+ {
36
+ return {
37
+ check_auth: true,
38
+ auth_optional: false
39
+ };
40
+ }
41
+ override getID()
42
+ {
43
+ return null;
44
+ }
45
+ override async handle()
46
+ {
47
+ let entity_id = new ObjectService(this.req.body.entity_id).getString();
48
+ let category_id = new ObjectService(this.req.body.category_id).getString();
49
+
50
+ let ans = await this.tables.entity_category.create(this.props.access, this.props.session, this.props.access.owner_id, entity_id, category_id, null);
51
+ return await this.tables.entity_category.secure(ans);
52
+ }
53
53
  }