"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.overviewResultsSchema = exports.moduleResultsSchema = exports.tagSchema = exports.metadataSchema = exports.resultSchema = exports.statusSchema = void 0;
const mongoose_1 = require("mongoose");
const status_1 = require("../report/status");
var statusSchema;
(function (statusSchema) {
    statusSchema["ambiguous"] = "ambiguous";
    statusSchema["failed"] = "failed";
    statusSchema["passed"] = "passed";
    statusSchema["pending"] = "pending";
    statusSchema["skipped"] = "skipped";
    statusSchema["undefined"] = "undefined";
})(statusSchema = exports.statusSchema || (exports.statusSchema = {}));
;
exports.resultSchema = new mongoose_1.Schema({
    icon: { required: false, type: String },
    status: { default: 'passed', enum: statusSchema, required: false, type: String }
}, {
    _id: false,
    id: false,
});
exports.metadataSchema = new mongoose_1.Schema({
    icon: { required: false, type: String },
    name: { required: true, type: String },
    value: { required: false, type: String }
}, {
    _id: false,
    id: false,
});
exports.tagSchema = new mongoose_1.Schema({
    line: { required: false, type: Number },
    name: { required: false, type: String }
}, {
    _id: false,
    id: false,
});
exports.moduleResultsSchema = new mongoose_1.Schema({
    ambiguous: { required: true, type: Number },
    ambiguousPercentage: { required: false, type: String },
    failed: { required: true, type: Number },
    failedPercentage: { required: false, type: String },
    passed: { required: true, type: Number },
    passedPercentage: { required: false, type: String },
    pending: { required: true, type: Number },
    pendingPercentage: { required: false, type: String },
    skipped: { required: true, type: Number },
    skippedPercentage: { required: false, type: String },
    status: { enum: Object.values(status_1.Status), required: true, type: String },
    statusIcon: { required: false, type: String },
    time: { required: false, type: String },
    timeInNanoSeconds: { required: false, type: Number },
    total: { required: true, type: Number },
    undefined: { required: true, type: Number },
    undefinedPercentage: { required: false, type: String },
    various: { required: false, type: Number },
    variousPercentage: { required: false, type: String },
}, {
    _id: false,
    id: false,
});
exports.overviewResultsSchema = new mongoose_1.Schema({
    ambiguous: { required: false, type: Number },
    ambiguousPercentage: { required: false, type: String },
    duration: { required: false, type: Number },
    durationHHMMSS: { required: false, type: String },
    failed: { required: false, type: Number },
    failedPercentage: { required: false, type: String },
    passed: { required: false, type: Number },
    passedPercentage: { required: false, type: String },
    pending: { required: false, type: Number },
    pendingPercentage: { required: false, type: String },
    skipped: { required: false, type: Number },
    skippedPercentage: { required: false, type: String },
    status: { enum: Object.values(status_1.Status), required: false, type: String },
    time: { required: false, type: String },
    timeInNanoSeconds: { required: false, type: Number },
    total: { required: false, type: Number },
    undefined: { required: false, type: Number },
    undefinedPercentage: { required: false, type: String },
    various: { required: false, type: Number },
    variousPercentage: { required: false, type: String },
}, {
    _id: false,
    id: false,
});
//# sourceMappingURL=mongoose-common-schemas.js.map