"use strict";
var __decorate = (this && this.__decorate) || function (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;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Setting = void 0;
const openapi = require("@nestjs/swagger");
const common_entity_1 = require("./common.entity");
const typeorm_1 = require("typeorm");
const user_entity_1 = require("./user.entity");
const module_metadata_entity_1 = require("./module-metadata.entity");
let Setting = class Setting extends common_entity_1.CommonEntity {
    static _OPENAPI_METADATA_FACTORY() {
        return { key: { required: true, type: () => String }, value: { required: true, type: () => String }, type: { required: true, type: () => String }, level: { required: true, type: () => String }, encrypted: { required: true, type: () => Boolean }, user: { required: true, type: () => require("./user.entity").User }, moduleMetadata: { required: true, type: () => require("./module-metadata.entity").ModuleMetadata } };
    }
};
exports.Setting = Setting;
__decorate([
    (0, typeorm_1.Index)({ unique: true }),
    (0, typeorm_1.Column)({ type: "varchar", nullable: false }),
    __metadata("design:type", String)
], Setting.prototype, "key", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: "varchar", nullable: true }),
    __metadata("design:type", String)
], Setting.prototype, "value", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: "type", type: "varchar", nullable: true }),
    __metadata("design:type", String)
], Setting.prototype, "type", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: "level", type: "varchar", nullable: true }),
    __metadata("design:type", String)
], Setting.prototype, "level", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: "encrypted", default: false }),
    __metadata("design:type", Boolean)
], Setting.prototype, "encrypted", void 0);
__decorate([
    (0, typeorm_1.Index)(),
    (0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: true }),
    (0, typeorm_1.JoinColumn)(),
    __metadata("design:type", user_entity_1.User)
], Setting.prototype, "user", void 0);
__decorate([
    (0, typeorm_1.Index)(),
    (0, typeorm_1.ManyToOne)(() => module_metadata_entity_1.ModuleMetadata, { nullable: true }),
    (0, typeorm_1.JoinColumn)(),
    __metadata("design:type", module_metadata_entity_1.ModuleMetadata)
], Setting.prototype, "moduleMetadata", void 0);
exports.Setting = Setting = __decorate([
    (0, typeorm_1.Entity)("ss_setting")
], Setting);
//# sourceMappingURL=setting.entity.js.map