"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "PrinterFile", {
    enumerable: true,
    get: function() {
        return PrinterFile;
    }
});
const _baseentity = require("./base.entity");
const _typeorm = require("typeorm");
const _gcodeanalysisdto = require("../services/interfaces/gcode-analysis.dto");
const _printerfiledto = require("../services/interfaces/printer-file.dto");
const _printerentity = require("./printer.entity");
const _octoprintfiledto = require("../services/octoprint/dto/files/octoprint-file.dto");
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 PrinterFile extends _baseentity.BaseEntity {
    printer;
    printerId;
    name;
    date;
    display;
    gcodeAnalysis;
    hash;
    origin;
    path;
    prints;
    refs;
    size;
    statistics;
    type;
    typePath;
    customData;
}
_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)
], PrinterFile.prototype, "printer", void 0);
_ts_decorate([
    (0, _typeorm.Column)(),
    _ts_metadata("design:type", Number)
], PrinterFile.prototype, "printerId", void 0);
_ts_decorate([
    (0, _typeorm.Column)(),
    _ts_metadata("design:type", String)
], PrinterFile.prototype, "name", void 0);
_ts_decorate([
    (0, _typeorm.Column)(),
    _ts_metadata("design:type", Number)
], PrinterFile.prototype, "date", void 0);
_ts_decorate([
    (0, _typeorm.Column)(),
    _ts_metadata("design:type", String)
], PrinterFile.prototype, "display", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        type: "simple-json",
        nullable: true
    }),
    _ts_metadata("design:type", typeof _gcodeanalysisdto.GcodeAnalysisDto === "undefined" ? Object : _gcodeanalysisdto.GcodeAnalysisDto)
], PrinterFile.prototype, "gcodeAnalysis", void 0);
_ts_decorate([
    (0, _typeorm.Column)(),
    _ts_metadata("design:type", String)
], PrinterFile.prototype, "hash", void 0);
_ts_decorate([
    (0, _typeorm.Column)(),
    _ts_metadata("design:type", String)
], PrinterFile.prototype, "origin", void 0);
_ts_decorate([
    (0, _typeorm.Column)(),
    _ts_metadata("design:type", String)
], PrinterFile.prototype, "path", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        type: "simple-json",
        nullable: true
    }),
    _ts_metadata("design:type", typeof _printerfiledto.Prints === "undefined" ? Object : _printerfiledto.Prints)
], PrinterFile.prototype, "prints", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        type: "simple-json",
        nullable: true
    }),
    _ts_metadata("design:type", typeof _printerfiledto.Refs === "undefined" ? Object : _printerfiledto.Refs)
], PrinterFile.prototype, "refs", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        nullable: true
    }),
    _ts_metadata("design:type", Number)
], PrinterFile.prototype, "size", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        type: "simple-json",
        nullable: true
    }),
    _ts_metadata("design:type", typeof _printerfiledto.OctoPrintStatisticsDto === "undefined" ? Object : _printerfiledto.OctoPrintStatisticsDto)
], PrinterFile.prototype, "statistics", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        nullable: true
    }),
    _ts_metadata("design:type", String)
], PrinterFile.prototype, "type", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        type: "simple-array",
        nullable: true
    }),
    _ts_metadata("design:type", Array)
], PrinterFile.prototype, "typePath", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        type: "simple-json",
        nullable: false
    }),
    _ts_metadata("design:type", typeof _octoprintfiledto.OctoPrintCustomDto === "undefined" ? Object : _octoprintfiledto.OctoPrintCustomDto)
], PrinterFile.prototype, "customData", void 0);
PrinterFile = _ts_decorate([
    (0, _typeorm.Entity)()
], PrinterFile);

//# sourceMappingURL=printer-file.entity.js.map