@reachu/database 1.0.117 → 1.0.118

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.
@@ -1,10 +1,24 @@
1
1
  import AuditedModel from './AuditedModel';
2
2
  import { Product } from './Product.entity';
3
+ import { Price } from './Price.entity';
4
+ export declare enum _type {
5
+ downloadable = 1,
6
+ sample = 2,
7
+ link = 3
8
+ }
9
+ export declare enum _shareable {
10
+ yes = 1,
11
+ no = 2,
12
+ useConfig = 3
13
+ }
3
14
  export default class ProductDigital extends AuditedModel {
4
15
  id: number;
5
16
  deletedAt: Date;
6
17
  file_url: string;
7
18
  file_size: number;
19
+ shareable: _shareable | null;
20
+ type: _type | null;
21
+ price: Price;
8
22
  donwload_limit: number;
9
23
  expiration_date: Date;
10
24
  product: Product;
@@ -12,9 +12,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports._shareable = exports._type = void 0;
15
16
  const typeorm_1 = require("typeorm");
16
17
  const AuditedModel_1 = __importDefault(require("./AuditedModel"));
17
18
  const Product_entity_1 = require("./Product.entity");
19
+ const Price_entity_1 = require("./Price.entity");
20
+ var _type;
21
+ (function (_type) {
22
+ _type[_type["downloadable"] = 1] = "downloadable";
23
+ _type[_type["sample"] = 2] = "sample";
24
+ _type[_type["link"] = 3] = "link";
25
+ })(_type = exports._type || (exports._type = {}));
26
+ var _shareable;
27
+ (function (_shareable) {
28
+ _shareable[_shareable["yes"] = 1] = "yes";
29
+ _shareable[_shareable["no"] = 2] = "no";
30
+ _shareable[_shareable["useConfig"] = 3] = "useConfig";
31
+ })(_shareable = exports._shareable || (exports._shareable = {}));
18
32
  let ProductDigital = class ProductDigital extends AuditedModel_1.default {
19
33
  };
20
34
  __decorate([
@@ -33,6 +47,18 @@ __decorate([
33
47
  typeorm_1.Column('integer', { nullable: true }),
34
48
  __metadata("design:type", Number)
35
49
  ], ProductDigital.prototype, "file_size", void 0);
50
+ __decorate([
51
+ typeorm_1.Column('integer', { nullable: true }),
52
+ __metadata("design:type", Number)
53
+ ], ProductDigital.prototype, "shareable", void 0);
54
+ __decorate([
55
+ typeorm_1.Column('integer', { nullable: true }),
56
+ __metadata("design:type", Number)
57
+ ], ProductDigital.prototype, "type", void 0);
58
+ __decorate([
59
+ typeorm_1.Column(() => Price_entity_1.Price, { prefix: 'price_' }),
60
+ __metadata("design:type", Price_entity_1.Price)
61
+ ], ProductDigital.prototype, "price", void 0);
36
62
  __decorate([
37
63
  typeorm_1.Column('integer', { nullable: true }),
38
64
  __metadata("design:type", Number)
@@ -1 +1 @@
1
- {"version":3,"file":"ProductDigital.js","sourceRoot":"","sources":["../../src/entity/ProductDigital.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAOiB;AACjB,kEAA0C;AAC1C,qDAA2C;AAG3C,IAAqB,cAAc,GAAnC,MAAqB,cAAe,SAAQ,sBAAY;CA2BvD,CAAA;AAzBC;IADC,gCAAsB,EAAE;;0CACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;iDAAC;AAGhB;IADC,gBAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;gDACnB;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACpB;AAGlB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACf;AAGvB;IADC,gBAAM,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACtB,IAAI;uDAAC;AAMtB;IAJC,mBAAS,CAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE;QAC1D,KAAK,EAAE,KAAK;KACb,CAAC;IACD,oBAAU,E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C,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACf;AAGvB;IADC,gBAAM,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACtB,IAAI;uDAAC;AAMtB;IAJC,mBAAS,CAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE;QAC1D,KAAK,EAAE,KAAK;KACb,CAAC;IACD,oBAAU,EAAE;8BACJ,wBAAO;+CAAC;AAGjB;IADC,gBAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;4CACvB;AAnCM,cAAc;IADlC,gBAAM,EAAE;GACY,cAAc,CAoClC;kBApCoB,cAAc"}
@@ -2652,8 +2652,8 @@
2652
2652
  "affectsGlobalScope": false
2653
2653
  },
2654
2654
  "../src/entity/productdigital.ts": {
2655
- "version": "979148edce9886aef3487d70735d03f835c2d3977ca3cbde5ee8cb7e6506e30a",
2656
- "signature": "e82c4ae324740ff4e3caeec86c7a74d21840f860e3d21a3b30c2b7d30b9c3632",
2655
+ "version": "816cfe054dcc5d48de7fab883ccdeb14e80c1c3f146842ad377d615a9fb6bd1b",
2656
+ "signature": "5cae1b468d208a1dcb2f9372f04b11b7036ec008497e8bfba1aa24bbe0555a0b",
2657
2657
  "affectsGlobalScope": false
2658
2658
  },
2659
2659
  "../src/entity/modules/templates/endpointtemplateecommerce.ts": {
@@ -6059,6 +6059,7 @@
6059
6059
  "../src/entity/productdigital.ts": [
6060
6060
  "../node_modules/typeorm/index.d.ts",
6061
6061
  "../src/entity/auditedmodel.ts",
6062
+ "../src/entity/price.entity.ts",
6062
6063
  "../src/entity/product.entity.ts"
6063
6064
  ],
6064
6065
  "../src/entity/request.ts": [
@@ -8979,6 +8980,7 @@
8979
8980
  ],
8980
8981
  "../src/entity/productdigital.ts": [
8981
8982
  "../src/entity/auditedmodel.ts",
8983
+ "../src/entity/price.entity.ts",
8982
8984
  "../src/entity/product.entity.ts"
8983
8985
  ],
8984
8986
  "../src/entity/request.ts": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reachu/database",
3
- "version": "1.0.117",
3
+ "version": "1.0.118",
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.117",
25
- "@reachu/utils": "1.0.117",
24
+ "@reachu/logger": "1.0.118",
25
+ "@reachu/utils": "1.0.118",
26
26
  "dotenv": "8.0.0",
27
27
  "express": "4.17.1",
28
28
  "mysql2": "1.5.2",
@@ -8,6 +8,19 @@ import {
8
8
  } from 'typeorm';
9
9
  import AuditedModel from './AuditedModel';
10
10
  import { Product } from './Product.entity';
11
+ import { Price } from './Price.entity';
12
+
13
+ export enum _type {
14
+ downloadable = 1,
15
+ sample = 2,
16
+ link = 3,
17
+ }
18
+
19
+ export enum _shareable {
20
+ yes = 1,
21
+ no = 2,
22
+ useConfig = 3,
23
+ }
11
24
 
12
25
  @Entity()
13
26
  export default class ProductDigital extends AuditedModel {
@@ -23,6 +36,15 @@ export default class ProductDigital extends AuditedModel {
23
36
  @Column('integer', { nullable: true })
24
37
  file_size: number;
25
38
 
39
+ @Column('integer', { nullable: true })
40
+ shareable: _shareable | null;
41
+
42
+ @Column('integer', { nullable: true })
43
+ type: _type | null;
44
+
45
+ @Column(() => Price, { prefix: 'price_' })
46
+ price: Price;
47
+
26
48
  @Column('integer', { nullable: true })
27
49
  donwload_limit: number;
28
50