"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "Printer", {
    enumerable: true,
    get: function() {
        return Printer;
    }
});
const _classvalidator = require("class-validator");
const _typeorm = require("typeorm");
const _printertagentity = require("./printer-tag.entity");
const _printerapiinterface = require("../services/printer-api.interface");
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 Printer {
    id;
    name;
    printerURL;
    printerType;
    apiKey;
    username;
    password;
    enabled;
    disabledReason;
    assignee;
    printerTags;
    dateAdded;
    feedRate;
    flowRate;
}
_ts_decorate([
    (0, _typeorm.PrimaryGeneratedColumn)(),
    _ts_metadata("design:type", Number)
], Printer.prototype, "id", void 0);
_ts_decorate([
    (0, _typeorm.Column)(),
    _ts_metadata("design:type", String)
], Printer.prototype, "name", void 0);
_ts_decorate([
    (0, _typeorm.Column)(),
    _ts_metadata("design:type", String)
], Printer.prototype, "printerURL", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        default: _printerapiinterface.OctoprintType,
        nullable: false
    }),
    _ts_metadata("design:type", Number)
], Printer.prototype, "printerType", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        default: "",
        nullable: true
    }),
    (0, _classvalidator.IsAlphanumeric)(),
    _ts_metadata("design:type", String)
], Printer.prototype, "apiKey", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        default: "",
        nullable: true
    }),
    (0, _classvalidator.IsAlphanumeric)(),
    _ts_metadata("design:type", String)
], Printer.prototype, "username", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        default: "",
        nullable: true
    }),
    (0, _classvalidator.IsAlphanumeric)(),
    _ts_metadata("design:type", String)
], Printer.prototype, "password", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        nullable: false,
        default: true
    }),
    _ts_metadata("design:type", Boolean)
], Printer.prototype, "enabled", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        nullable: true
    }),
    _ts_metadata("design:type", String)
], Printer.prototype, "disabledReason", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        nullable: true
    }),
    _ts_metadata("design:type", String)
], Printer.prototype, "assignee", void 0);
_ts_decorate([
    (0, _typeorm.OneToMany)(()=>_printertagentity.PrinterTag, (pc)=>pc.printer),
    _ts_metadata("design:type", Array)
], Printer.prototype, "printerTags", void 0);
_ts_decorate([
    (0, _typeorm.CreateDateColumn)({
        type: "int"
    }),
    _ts_metadata("design:type", Number)
], Printer.prototype, "dateAdded", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        nullable: true
    }),
    _ts_metadata("design:type", Number)
], Printer.prototype, "feedRate", void 0);
_ts_decorate([
    (0, _typeorm.Column)({
        nullable: true
    }),
    _ts_metadata("design:type", Number)
], Printer.prototype, "flowRate", void 0);
Printer = _ts_decorate([
    (0, _typeorm.Entity)()
], Printer);

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