"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "PrinterTag", {
    enumerable: true,
    get: function() {
        return PrinterTag;
    }
});
const _typeorm = require("typeorm");
const _printerentity = require("./printer.entity");
const _tagentity = require("./tag.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 PrinterTag {
    id;
    printer;
    printerId;
    tag;
    tagId;
}
_ts_decorate([
    (0, _typeorm.PrimaryGeneratedColumn)(),
    _ts_metadata("design:type", Number)
], PrinterTag.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)
], PrinterTag.prototype, "printer", void 0);
_ts_decorate([
    (0, _typeorm.Column)(),
    _ts_metadata("design:type", Number)
], PrinterTag.prototype, "printerId", void 0);
_ts_decorate([
    (0, _typeorm.ManyToOne)(()=>_tagentity.Tag, {
        onDelete: "CASCADE",
        nullable: false
    }),
    (0, _typeorm.JoinColumn)({
        name: "tagId"
    }),
    _ts_metadata("design:type", typeof _typeorm.Relation === "undefined" ? Object : _typeorm.Relation)
], PrinterTag.prototype, "tag", void 0);
_ts_decorate([
    (0, _typeorm.Column)(),
    _ts_metadata("design:type", Number)
], PrinterTag.prototype, "tagId", void 0);
PrinterTag = _ts_decorate([
    (0, _typeorm.Entity)(),
    (0, _typeorm.Unique)([
        "printerId",
        "tagId"
    ])
], PrinterTag);

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