mfance-shark-v1 1.0.68 → 1.0.69
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.
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AuditableEntity } from "../../auditable/auditable.entity";
|
|
2
|
+
import { Agent } from "./users/agent.entity";
|
|
3
|
+
import { Distributor } from "./users/distributor.entity";
|
|
4
|
+
export declare class PaymentCode extends AuditableEntity {
|
|
5
|
+
agent: Agent;
|
|
6
|
+
distributor: Distributor;
|
|
7
|
+
code: string;
|
|
8
|
+
amount: number;
|
|
9
|
+
isUsed: boolean;
|
|
10
|
+
isExpired: boolean;
|
|
11
|
+
expiresAt: Date;
|
|
12
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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.PaymentCode = void 0;
|
|
13
|
+
const auditable_entity_1 = require("../../auditable/auditable.entity");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const agent_entity_1 = require("./users/agent.entity");
|
|
16
|
+
const distributor_entity_1 = require("./users/distributor.entity");
|
|
17
|
+
let PaymentCode = class PaymentCode extends auditable_entity_1.AuditableEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.PaymentCode = PaymentCode;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.ManyToOne)(() => agent_entity_1.Agent, (agent) => agent.id, {
|
|
22
|
+
nullable: false,
|
|
23
|
+
}),
|
|
24
|
+
(0, typeorm_1.JoinColumn)({ name: "agent_id" }),
|
|
25
|
+
__metadata("design:type", agent_entity_1.Agent)
|
|
26
|
+
], PaymentCode.prototype, "agent", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.ManyToOne)(() => distributor_entity_1.Distributor, (distributor) => distributor.id, {
|
|
29
|
+
nullable: false,
|
|
30
|
+
}),
|
|
31
|
+
(0, typeorm_1.JoinColumn)({ name: "distributor_id" }),
|
|
32
|
+
__metadata("design:type", distributor_entity_1.Distributor)
|
|
33
|
+
], PaymentCode.prototype, "distributor", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({
|
|
36
|
+
unique: true,
|
|
37
|
+
nullable: false,
|
|
38
|
+
}),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], PaymentCode.prototype, "code", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
type: "decimal",
|
|
44
|
+
precision: 10,
|
|
45
|
+
scale: 2,
|
|
46
|
+
nullable: false,
|
|
47
|
+
}),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], PaymentCode.prototype, "amount", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({
|
|
52
|
+
type: "boolean",
|
|
53
|
+
default: false,
|
|
54
|
+
nullable: false,
|
|
55
|
+
}),
|
|
56
|
+
__metadata("design:type", Boolean)
|
|
57
|
+
], PaymentCode.prototype, "isUsed", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({
|
|
60
|
+
type: "boolean",
|
|
61
|
+
default: false,
|
|
62
|
+
nullable: false,
|
|
63
|
+
}),
|
|
64
|
+
__metadata("design:type", Boolean)
|
|
65
|
+
], PaymentCode.prototype, "isExpired", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({
|
|
68
|
+
type: "timestamp",
|
|
69
|
+
nullable: false,
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", Date)
|
|
72
|
+
], PaymentCode.prototype, "expiresAt", void 0);
|
|
73
|
+
exports.PaymentCode = PaymentCode = __decorate([
|
|
74
|
+
(0, typeorm_1.Entity)({
|
|
75
|
+
name: "payment_codes",
|
|
76
|
+
})
|
|
77
|
+
], PaymentCode);
|
|
78
|
+
//# sourceMappingURL=payment-code.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-code.entity.js","sourceRoot":"","sources":["../../../src/common/entities/payment-code.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAmE;AACnE,qCAAgE;AAChE,uDAA6C;AAC7C,mEAAyD;AAKlD,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,kCAAe;CA8C/C,CAAA;AA9CY,kCAAW;AAKtB;IAJC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE;QAC3C,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;8BAC1B,oBAAK;0CAAC;AAMb;IAJC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAW,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;QAC7D,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;8BAC1B,gCAAW;gDAAC;AAMzB;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