"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OnmDomainBinding = void 0;
const tslib_1 = require("tslib");
const typeorm_1 = require("typeorm");
const type_graphql_1 = require("type-graphql");
const shell_1 = require("@things-factory/shell");
const auth_base_1 = require("@things-factory/auth-base");
let OnmDomainBinding = class OnmDomainBinding {
};
exports.OnmDomainBinding = OnmDomainBinding;
tslib_1.__decorate([
    (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
    (0, type_graphql_1.Field)(type => type_graphql_1.ID),
    tslib_1.__metadata("design:type", String)
], OnmDomainBinding.prototype, "id", void 0);
tslib_1.__decorate([
    (0, typeorm_1.ManyToOne)(type => shell_1.Domain, { nullable: true }),
    (0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true }),
    tslib_1.__metadata("design:type", shell_1.Domain)
], OnmDomainBinding.prototype, "onmDomain", void 0);
tslib_1.__decorate([
    (0, typeorm_1.RelationId)((onmDomainBinding) => onmDomainBinding.onmDomain),
    tslib_1.__metadata("design:type", String)
], OnmDomainBinding.prototype, "onmDomainId", void 0);
tslib_1.__decorate([
    (0, typeorm_1.ManyToOne)(type => shell_1.Domain, { nullable: true }),
    (0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true }),
    tslib_1.__metadata("design:type", shell_1.Domain)
], OnmDomainBinding.prototype, "powerPlantDomain", void 0);
tslib_1.__decorate([
    (0, typeorm_1.RelationId)((onmDomainBinding) => onmDomainBinding.powerPlantDomain),
    tslib_1.__metadata("design:type", String)
], OnmDomainBinding.prototype, "powerPlantDomainId", void 0);
tslib_1.__decorate([
    (0, typeorm_1.CreateDateColumn)(),
    (0, type_graphql_1.Field)({ nullable: true }),
    tslib_1.__metadata("design:type", Date)
], OnmDomainBinding.prototype, "createdAt", void 0);
tslib_1.__decorate([
    (0, typeorm_1.UpdateDateColumn)(),
    (0, type_graphql_1.Field)({ nullable: true }),
    tslib_1.__metadata("design:type", Date)
], OnmDomainBinding.prototype, "updatedAt", void 0);
tslib_1.__decorate([
    (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
    (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
    tslib_1.__metadata("design:type", auth_base_1.User)
], OnmDomainBinding.prototype, "creator", void 0);
tslib_1.__decorate([
    (0, typeorm_1.RelationId)((onmDomainBinding) => onmDomainBinding.creator),
    tslib_1.__metadata("design:type", String)
], OnmDomainBinding.prototype, "creatorId", void 0);
tslib_1.__decorate([
    (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
    (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
    tslib_1.__metadata("design:type", auth_base_1.User)
], OnmDomainBinding.prototype, "updater", void 0);
tslib_1.__decorate([
    (0, typeorm_1.RelationId)((onmDomainBinding) => onmDomainBinding.updater),
    tslib_1.__metadata("design:type", String)
], OnmDomainBinding.prototype, "updaterId", void 0);
exports.OnmDomainBinding = OnmDomainBinding = tslib_1.__decorate([
    (0, typeorm_1.Entity)(),
    (0, typeorm_1.Index)('ix_onm_domain_binding_0', (onmDomainBinding) => [onmDomainBinding.onmDomain, onmDomainBinding.powerPlantDomain], { unique: true }),
    (0, type_graphql_1.ObjectType)({ description: 'O&M 도메인과 발전소 도메인 N:N 연결 정보' })
], OnmDomainBinding);
//# sourceMappingURL=onm-domain-binding.js.map