@signa-app/entities 0.2.3 → 0.3.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.
- package/dist/entities/box-statistics.entity.d.ts +9 -0
- package/dist/entities/box-statistics.entity.d.ts.map +1 -0
- package/dist/entities/box-statistics.entity.js +42 -0
- package/dist/entities/box-statistics.entity.js.map +1 -0
- package/dist/entities/box.entity.d.ts +3 -0
- package/dist/entities/box.entity.d.ts.map +1 -1
- package/dist/entities/box.entity.js +9 -0
- package/dist/entities/box.entity.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseEntity } from './base.entity';
|
|
2
|
+
import { BoxEntity } from './box.entity';
|
|
3
|
+
export declare class BoxStatisticsEntity extends BaseEntity {
|
|
4
|
+
box: BoxEntity;
|
|
5
|
+
isSold: boolean;
|
|
6
|
+
salesCount: number;
|
|
7
|
+
totalSoldAmount: bigint;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=box-statistics.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box-statistics.entity.d.ts","sourceRoot":"","sources":["../../src/entities/box-statistics.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,qBACa,mBAAoB,SAAQ,UAAU;IAMjD,GAAG,EAAG,SAAS,CAAC;IAGhB,MAAM,EAAG,OAAO,CAAC;IAGjB,UAAU,EAAG,MAAM,CAAC;IAGpB,eAAe,EAAG,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BoxStatisticsEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const base_entity_1 = require("./base.entity");
|
|
15
|
+
const box_entity_1 = require("./box.entity");
|
|
16
|
+
let BoxStatisticsEntity = class BoxStatisticsEntity extends base_entity_1.BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.BoxStatisticsEntity = BoxStatisticsEntity;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.OneToOne)(() => box_entity_1.BoxEntity, (box) => box.statistics, {
|
|
21
|
+
nullable: false,
|
|
22
|
+
onDelete: 'CASCADE',
|
|
23
|
+
}),
|
|
24
|
+
(0, typeorm_1.JoinColumn)({ name: 'box_uuid' }),
|
|
25
|
+
__metadata("design:type", box_entity_1.BoxEntity)
|
|
26
|
+
], BoxStatisticsEntity.prototype, "box", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], BoxStatisticsEntity.prototype, "isSold", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], BoxStatisticsEntity.prototype, "salesCount", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'bigint', default: 0 }),
|
|
37
|
+
__metadata("design:type", BigInt)
|
|
38
|
+
], BoxStatisticsEntity.prototype, "totalSoldAmount", void 0);
|
|
39
|
+
exports.BoxStatisticsEntity = BoxStatisticsEntity = __decorate([
|
|
40
|
+
(0, typeorm_1.Entity)('box_statistics')
|
|
41
|
+
], BoxStatisticsEntity);
|
|
42
|
+
//# sourceMappingURL=box-statistics.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box-statistics.entity.js","sourceRoot":"","sources":["../../src/entities/box-statistics.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,+CAA2C;AAC3C,6CAAyC;AAGlC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,wBAAU;CAgBlD,CAAA;AAhBY,kDAAmB;AAM9B;IALC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,sBAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,EAAE;QAClD,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;8BAC3B,sBAAS;gDAAC;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;mDAC3B;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uDAChB;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;4DACd;8BAfd,mBAAmB;IAD/B,IAAA,gBAAM,EAAC,gBAAgB,CAAC;GACZ,mBAAmB,CAgB/B"}
|
|
@@ -2,6 +2,7 @@ import { ECurrency } from '../types/enums';
|
|
|
2
2
|
import { BaseEntity } from './base.entity';
|
|
3
3
|
import { BoxOfferEntity } from './box-offer.entity';
|
|
4
4
|
import { BoxSlotEntity } from './box-slot.entity';
|
|
5
|
+
import { BoxStatisticsEntity } from './box-statistics.entity';
|
|
5
6
|
import { UserPurchasedBoxEntity } from './user-purchased-box.entity';
|
|
6
7
|
import { UserEntity } from './user.entity';
|
|
7
8
|
export declare class BoxEntity extends BaseEntity {
|
|
@@ -12,8 +13,10 @@ export declare class BoxEntity extends BaseEntity {
|
|
|
12
13
|
encryptedContentKey?: string | null;
|
|
13
14
|
actualFileSizeBytes?: bigint | null;
|
|
14
15
|
isClosed: boolean;
|
|
16
|
+
wasOpened: boolean;
|
|
15
17
|
slot?: BoxSlotEntity | null;
|
|
16
18
|
offers: BoxOfferEntity[];
|
|
17
19
|
purchases: UserPurchasedBoxEntity[];
|
|
20
|
+
statistics?: BoxStatisticsEntity | null;
|
|
18
21
|
}
|
|
19
22
|
//# sourceMappingURL=box.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.entity.d.ts","sourceRoot":"","sources":["../../src/entities/box.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"box.entity.d.ts","sourceRoot":"","sources":["../../src/entities/box.entity.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAC,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAEzC,qBACa,SAAU,SAAQ,UAAU;IAGrC,KAAK,EAAG,UAAU,CAAC;IAGnB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,QAAQ,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAG5B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGpC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGpC,QAAQ,EAAG,OAAO,CAAC;IAGnB,SAAS,EAAG,OAAO,CAAC;IAOpB,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAG5B,MAAM,EAAG,cAAc,EAAE,CAAC;IAG1B,SAAS,EAAG,sBAAsB,EAAE,CAAC;IAGrC,UAAU,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAC3C"}
|
|
@@ -15,6 +15,7 @@ const enums_1 = require("../types/enums");
|
|
|
15
15
|
const base_entity_1 = require("./base.entity");
|
|
16
16
|
const box_offer_entity_1 = require("./box-offer.entity");
|
|
17
17
|
const box_slot_entity_1 = require("./box-slot.entity");
|
|
18
|
+
const box_statistics_entity_1 = require("./box-statistics.entity");
|
|
18
19
|
const user_purchased_box_entity_1 = require("./user-purchased-box.entity");
|
|
19
20
|
const user_entity_1 = require("./user.entity");
|
|
20
21
|
let BoxEntity = class BoxEntity extends base_entity_1.BaseEntity {
|
|
@@ -49,6 +50,10 @@ __decorate([
|
|
|
49
50
|
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
50
51
|
__metadata("design:type", Boolean)
|
|
51
52
|
], BoxEntity.prototype, "isClosed", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
55
|
+
__metadata("design:type", Boolean)
|
|
56
|
+
], BoxEntity.prototype, "wasOpened", void 0);
|
|
52
57
|
__decorate([
|
|
53
58
|
(0, typeorm_1.ManyToOne)(() => box_slot_entity_1.BoxSlotEntity, (slot) => slot.boxes, {
|
|
54
59
|
nullable: true,
|
|
@@ -65,6 +70,10 @@ __decorate([
|
|
|
65
70
|
(0, typeorm_1.OneToMany)(() => user_purchased_box_entity_1.UserPurchasedBoxEntity, (purchase) => purchase.box),
|
|
66
71
|
__metadata("design:type", Array)
|
|
67
72
|
], BoxEntity.prototype, "purchases", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.OneToOne)(() => box_statistics_entity_1.BoxStatisticsEntity, (statistics) => statistics.box),
|
|
75
|
+
__metadata("design:type", Object)
|
|
76
|
+
], BoxEntity.prototype, "statistics", void 0);
|
|
68
77
|
exports.BoxEntity = BoxEntity = __decorate([
|
|
69
78
|
(0, typeorm_1.Entity)('boxes')
|
|
70
79
|
], BoxEntity);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.entity.js","sourceRoot":"","sources":["../../src/entities/box.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"box.entity.js","sourceRoot":"","sources":["../../src/entities/box.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAOiB;AACjB,0CAAyC;AACzC,+CAAyC;AACzC,yDAAkD;AAClD,uDAAgD;AAChD,mEAA4D;AAC5D,2EAAmE;AACnE,+CAAyC;AAGlC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAU;CAyCxC,CAAA;AAzCY,8BAAS;AAGlB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAU,EAAE,EAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAC,CAAC;IACpE,IAAA,oBAAU,EAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;8BACzB,wBAAU;wCAAC;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAC,IAAI,EAAE,SAAS,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AAmB,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;;6CAC5B;oBAxC/B,SAAS;IADrB,IAAA,gBAAM,EAAC,OAAO,CAAC;GACH,SAAS,CAyCrB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './entities/app-settings';
|
|
2
2
|
export * from './entities/base.entity';
|
|
3
3
|
export * from './entities/box-offer.entity';
|
|
4
|
+
export * from './entities/box-statistics.entity';
|
|
4
5
|
export * from './entities/box-slot.entity';
|
|
5
6
|
export * from './entities/box.entity';
|
|
6
7
|
export * from './entities/chat.entity';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./entities/app-settings"), exports);
|
|
18
18
|
__exportStar(require("./entities/base.entity"), exports);
|
|
19
19
|
__exportStar(require("./entities/box-offer.entity"), exports);
|
|
20
|
+
__exportStar(require("./entities/box-statistics.entity"), exports);
|
|
20
21
|
__exportStar(require("./entities/box-slot.entity"), exports);
|
|
21
22
|
__exportStar(require("./entities/box.entity"), exports);
|
|
22
23
|
__exportStar(require("./entities/chat.entity"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,yDAAuC;AACvC,8DAA4C;AAC5C,6DAA2C;AAC3C,wDAAsC;AACtC,yDAAuC;AACvC,wDAAsC;AACtC,sEAAoD;AACpD,4DAA0C;AAC1C,oEAAkD;AAClD,uEAAqD;AACrD,yDAAuC;AACvC,iEAA+C;AAC/C,gDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,yDAAuC;AACvC,8DAA4C;AAC5C,mEAAiD;AACjD,6DAA2C;AAC3C,wDAAsC;AACtC,yDAAuC;AACvC,wDAAsC;AACtC,sEAAoD;AACpD,4DAA0C;AAC1C,oEAAkD;AAClD,uEAAqD;AACrD,yDAAuC;AACvC,iEAA+C;AAC/C,gDAA8B"}
|