91 lines
4.0 KiB
JavaScript
91 lines
4.0 KiB
JavaScript
"use strict";
|
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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;
|
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
};
|
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.DeckAggregate = exports.CardType = exports.State = exports.CType = exports.Type = void 0;
|
|
const typeorm_1 = require("typeorm");
|
|
const OrganizationAggregate_1 = require("../Organization/OrganizationAggregate");
|
|
var Type;
|
|
(function (Type) {
|
|
Type[Type["LUCK"] = 0] = "LUCK";
|
|
Type[Type["JOKER"] = 1] = "JOKER";
|
|
Type[Type["QUESTION"] = 2] = "QUESTION";
|
|
})(Type || (exports.Type = Type = {}));
|
|
var CType;
|
|
(function (CType) {
|
|
CType[CType["PUBLIC"] = 0] = "PUBLIC";
|
|
CType[CType["PRIVATE"] = 1] = "PRIVATE";
|
|
CType[CType["ORGANIZATION"] = 2] = "ORGANIZATION";
|
|
})(CType || (exports.CType = CType = {}));
|
|
var State;
|
|
(function (State) {
|
|
State[State["ACTIVE"] = 0] = "ACTIVE";
|
|
State[State["SOFT_DELETE"] = 1] = "SOFT_DELETE";
|
|
})(State || (exports.State = State = {}));
|
|
var CardType;
|
|
(function (CardType) {
|
|
CardType[CardType["QUIZ"] = 0] = "QUIZ";
|
|
CardType[CardType["SENTENCE_PAIRING"] = 1] = "SENTENCE_PAIRING";
|
|
CardType[CardType["OWN_ANSWER"] = 2] = "OWN_ANSWER";
|
|
CardType[CardType["TRUE_FALSE"] = 3] = "TRUE_FALSE";
|
|
CardType[CardType["CLOSER"] = 4] = "CLOSER";
|
|
})(CardType || (exports.CardType = CardType = {}));
|
|
let DeckAggregate = class DeckAggregate {
|
|
};
|
|
exports.DeckAggregate = DeckAggregate;
|
|
__decorate([
|
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
__metadata("design:type", String)
|
|
], DeckAggregate.prototype, "id", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
__metadata("design:type", String)
|
|
], DeckAggregate.prototype, "name", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'int' }),
|
|
__metadata("design:type", Number)
|
|
], DeckAggregate.prototype, "type", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'uuid', name: 'user_id' }),
|
|
__metadata("design:type", String)
|
|
], DeckAggregate.prototype, "userid", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.CreateDateColumn)({ name: 'creation_date' }),
|
|
__metadata("design:type", Date)
|
|
], DeckAggregate.prototype, "creationdate", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'json' }),
|
|
__metadata("design:type", Array)
|
|
], DeckAggregate.prototype, "cards", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'int', default: 0, name: 'played_number' }),
|
|
__metadata("design:type", Number)
|
|
], DeckAggregate.prototype, "playedNumber", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'int', default: CType.PUBLIC }),
|
|
__metadata("design:type", Number)
|
|
], DeckAggregate.prototype, "ctype", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.UpdateDateColumn)({ name: 'update_date' }),
|
|
__metadata("design:type", Date)
|
|
], DeckAggregate.prototype, "updatedate", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'int', default: State.ACTIVE }),
|
|
__metadata("design:type", Number)
|
|
], DeckAggregate.prototype, "state", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.ManyToOne)(() => OrganizationAggregate_1.OrganizationAggregate, { nullable: true }),
|
|
(0, typeorm_1.JoinColumn)({ name: 'organization_id' }),
|
|
__metadata("design:type", Object)
|
|
], DeckAggregate.prototype, "organization", void 0);
|
|
exports.DeckAggregate = DeckAggregate = __decorate([
|
|
(0, typeorm_1.Entity)('Decks')
|
|
], DeckAggregate);
|
|
//# sourceMappingURL=DeckAggregate.js.map
|