@fdm-monster/server
Version:
FDM Monster is a bulk OctoPrint manager to set up, configure and monitor 3D printers. Our aim is to provide extremely optimized websocket performance and reliability.
70 lines (69 loc) • 2.4 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "PrinterGroup", {
enumerable: true,
get: function() {
return PrinterGroup;
}
});
const _typeorm = require("typeorm");
const _printerentity = require("./printer.entity");
const _groupentity = require("./group.entity");
function _ts_decorate(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;
}
function _ts_metadata(k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
}
class PrinterGroup {
id;
printer;
printerId;
group;
groupId;
}
_ts_decorate([
(0, _typeorm.PrimaryGeneratedColumn)(),
_ts_metadata("design:type", Number)
], PrinterGroup.prototype, "id", void 0);
_ts_decorate([
(0, _typeorm.ManyToOne)(()=>_printerentity.Printer, {
onDelete: "CASCADE",
nullable: false
}),
(0, _typeorm.JoinColumn)({
name: "printerId"
}),
_ts_metadata("design:type", typeof _typeorm.Relation === "undefined" ? Object : _typeorm.Relation)
], PrinterGroup.prototype, "printer", void 0);
_ts_decorate([
(0, _typeorm.Column)(),
_ts_metadata("design:type", Number)
], PrinterGroup.prototype, "printerId", void 0);
_ts_decorate([
(0, _typeorm.ManyToOne)(()=>_groupentity.Group, {
onDelete: "CASCADE",
nullable: false
}),
(0, _typeorm.JoinColumn)({
name: "groupId"
}),
_ts_metadata("design:type", typeof _typeorm.Relation === "undefined" ? Object : _typeorm.Relation)
], PrinterGroup.prototype, "group", void 0);
_ts_decorate([
(0, _typeorm.Column)(),
_ts_metadata("design:type", Number)
], PrinterGroup.prototype, "groupId", void 0);
PrinterGroup = _ts_decorate([
(0, _typeorm.Entity)(),
(0, _typeorm.Unique)([
"printerId",
"groupId"
])
], PrinterGroup);
//# sourceMappingURL=printer-group.entity.js.map