@reachu/database 1.0.205 → 1.0.207

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.
@@ -4,6 +4,7 @@ export default class NotFoundProduct extends AuditedModel {
4
4
  apiKey?: string;
5
5
  channelIdGeneral?: number;
6
6
  channelId?: number;
7
+ channelName?: string;
7
8
  barcode?: string;
8
9
  count?: number;
9
10
  }
@@ -32,6 +32,10 @@ __decorate([
32
32
  typeorm_1.Column('integer', { nullable: false }),
33
33
  __metadata("design:type", Number)
34
34
  ], NotFoundProduct.prototype, "channelId", void 0);
35
+ __decorate([
36
+ typeorm_1.Column('varchar', { nullable: true }),
37
+ __metadata("design:type", String)
38
+ ], NotFoundProduct.prototype, "channelName", void 0);
35
39
  __decorate([
36
40
  typeorm_1.Column('varchar', { nullable: false }),
37
41
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"NotFoundProduct.js","sourceRoot":"","sources":["../../src/entity/NotFoundProduct.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAyE;AACzE,kEAA0C;AAI1C,IAAqB,eAAe,GAApC,MAAqB,eAAgB,SAAQ,sBAAY;CAkBxD,CAAA;AAhBC;IADC,gCAAsB,EAAE;;2CACd;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;+CACvB;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;yDACb;AAG1B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;kDACpB;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;gDACtB;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACvB;AAjBI,eAAe;IAFnC,gBAAM,EAAE;IACR,gBAAM,CAAC,CAAC,QAAQ,EAAE,kBAAkB,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;GAC1C,eAAe,CAkBnC;kBAlBoB,eAAe"}
1
+ {"version":3,"file":"NotFoundProduct.js","sourceRoot":"","sources":["../../src/entity/NotFoundProduct.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAyE;AACzE,kEAA0C;AAI1C,IAAqB,eAAe,GAApC,MAAqB,eAAgB,SAAQ,sBAAY;CAqBxD,CAAA;AAnBC;IADC,gCAAsB,EAAE;;2CACd;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;+CACvB;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;yDACb;AAG1B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;kDACpB;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACjB;AAGrB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;gDACtB;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACvB;AApBI,eAAe;IAFnC,gBAAM,EAAE;IACR,gBAAM,CAAC,CAAC,QAAQ,EAAE,kBAAkB,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;GAC1C,eAAe,CAqBnC;kBArBoB,eAAe"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+ export declare class NotFoundProduct1732063824049 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -0,0 +1,30 @@
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.NotFoundProduct1732063824049 = void 0;
13
+ class NotFoundProduct1732063824049 {
14
+ constructor() {
15
+ this.name = 'NotFoundProduct1732063824049';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`CREATE TABLE \`not_found_product\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`id\` int NOT NULL AUTO_INCREMENT, \`api_key\` varchar(255) NOT NULL, \`channel_id_general\` int NOT NULL, \`channel_id\` int NOT NULL, \`barcode\` varchar(255) NOT NULL, \`count\` int NULL, UNIQUE INDEX \`IDX_cc976f2be6a2290712b72f2159\` (\`api_key\`, \`channel_id_general\`, \`channel_id\`, \`barcode\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
20
+ });
21
+ }
22
+ down(queryRunner) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ yield queryRunner.query(`DROP INDEX \`IDX_cc976f2be6a2290712b72f2159\` ON \`not_found_product\``);
25
+ yield queryRunner.query(`DROP TABLE \`not_found_product\``);
26
+ });
27
+ }
28
+ }
29
+ exports.NotFoundProduct1732063824049 = NotFoundProduct1732063824049;
30
+ //# sourceMappingURL=1732063824049-NotFoundProduct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1732063824049-NotFoundProduct.js","sourceRoot":"","sources":["../../src/migrations/1732063824049-NotFoundProduct.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,4BAA4B;IAAzC;QACE,SAAI,GAAG,8BAA8B,CAAC;IAcxC,CAAC;IAZc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,giBAAgiB,CACjiB,CAAC;QACJ,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,MAAM,WAAW,CAAC,KAAK,CACrB,wEAAwE,CACzE,CAAC;YACF,MAAM,WAAW,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAC9D,CAAC;KAAA;CACF;AAfD,oEAeC"}
@@ -2797,8 +2797,8 @@
2797
2797
  "affectsGlobalScope": false
2798
2798
  },
2799
2799
  "../src/entity/notfoundproduct.ts": {
2800
- "version": "494218081675d59cb3472834258ed125a3061187c761aedc44b4677a94e4f1ff",
2801
- "signature": "f6a727fd8d8add0171e6e1768c7fc6be29c6144eff83dc8d680e0ab0a6f18572",
2800
+ "version": "53a7951926c0efcb09a734a2b22d4139a21e8b6eb708a8cfb995317a3e905d57",
2801
+ "signature": "9717c7aa423ceb1070387a8a4a586bdf1badaa0b373688e42bd13f7cf80beb8e",
2802
2802
  "affectsGlobalScope": false
2803
2803
  },
2804
2804
  "../src/entity/index.ts": {
@@ -3876,6 +3876,11 @@
3876
3876
  "signature": "522c3c038069f54a0958db883860caa8f146c3372a92ffb51d9084c7dcf493b2",
3877
3877
  "affectsGlobalScope": false
3878
3878
  },
3879
+ "../src/migrations/1732063824049-notfoundproduct.ts": {
3880
+ "version": "a1eeb558b2a81fdf89d99989901e1b9b52a73bd65a73f9a7124f9badd13d5b1a",
3881
+ "signature": "a0e10dd5be39fab4abe2bd6d5d81ac94fdcd6bf2601d4a910bce18bc0fdd4aac",
3882
+ "affectsGlobalScope": false
3883
+ },
3879
3884
  "../src/migrations/execute/index.ts": {
3880
3885
  "version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
3881
3886
  "signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
@@ -7127,6 +7132,9 @@
7127
7132
  "../src/migrations/1731073175371-fix-international-phone.ts": [
7128
7133
  "../node_modules/typeorm/index.d.ts"
7129
7134
  ],
7135
+ "../src/migrations/1732063824049-notfoundproduct.ts": [
7136
+ "../node_modules/typeorm/index.d.ts"
7137
+ ],
7130
7138
  "../src/migrations/execute/index.ts": [
7131
7139
  "../src/config/connect.ts"
7132
7140
  ],
@@ -10235,6 +10243,9 @@
10235
10243
  "../src/migrations/1731073175371-fix-international-phone.ts": [
10236
10244
  "../node_modules/typeorm/index.d.ts"
10237
10245
  ],
10246
+ "../src/migrations/1732063824049-notfoundproduct.ts": [
10247
+ "../node_modules/typeorm/index.d.ts"
10248
+ ],
10238
10249
  "../src/migrations/index.ts": [
10239
10250
  "../src/migrations/1628474597284-initialschema.ts",
10240
10251
  "../src/migrations/1630077596132-removemangopay.ts",
@@ -11178,6 +11189,7 @@
11178
11189
  "../src/migrations/1727969574564-promote_to_qa_03_10_24_v2.ts",
11179
11190
  "../src/migrations/1728584044370-promote_to_prod_10_10_23.ts",
11180
11191
  "../src/migrations/1731073175371-fix-international-phone.ts",
11192
+ "../src/migrations/1732063824049-notfoundproduct.ts",
11181
11193
  "../src/migrations/execute/index.ts",
11182
11194
  "../src/migrations/index.ts",
11183
11195
  "../src/repositories/discount/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reachu/database",
3
- "version": "1.0.205",
3
+ "version": "1.0.207",
4
4
  "description": "reachu-database",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "author": "reachu",
22
22
  "license": "ISC",
23
23
  "dependencies": {
24
- "@reachu/logger": "1.0.205",
25
- "@reachu/utils": "1.0.205",
24
+ "@reachu/logger": "1.0.207",
25
+ "@reachu/utils": "1.0.207",
26
26
  "dotenv": "8.0.0",
27
27
  "eventemitter2": "^6.4.9",
28
28
  "express": "4.17.1",
@@ -16,6 +16,9 @@ export default class NotFoundProduct extends AuditedModel {
16
16
  @Column('integer', { nullable: false })
17
17
  channelId?: number;
18
18
 
19
+ @Column('varchar', { nullable: true })
20
+ channelName?: string;
21
+
19
22
  @Column('varchar', { nullable: false })
20
23
  barcode?: string;
21
24
 
@@ -0,0 +1,18 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+
3
+ export class NotFoundProduct1732063824049 implements MigrationInterface {
4
+ name = 'NotFoundProduct1732063824049';
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `CREATE TABLE \`not_found_product\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`id\` int NOT NULL AUTO_INCREMENT, \`api_key\` varchar(255) NOT NULL, \`channel_id_general\` int NOT NULL, \`channel_id\` int NOT NULL, \`barcode\` varchar(255) NOT NULL, \`count\` int NULL, UNIQUE INDEX \`IDX_cc976f2be6a2290712b72f2159\` (\`api_key\`, \`channel_id_general\`, \`channel_id\`, \`barcode\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`,
9
+ );
10
+ }
11
+
12
+ public async down(queryRunner: QueryRunner): Promise<void> {
13
+ await queryRunner.query(
14
+ `DROP INDEX \`IDX_cc976f2be6a2290712b72f2159\` ON \`not_found_product\``,
15
+ );
16
+ await queryRunner.query(`DROP TABLE \`not_found_product\``);
17
+ }
18
+ }