"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RolesEndpointsModelSwagger = exports.RolesEndpointsModel = void 0;
const roles_endpoint_schema_1 = require("../schemas/roles-endpoint.schema");
const delete_schema_1 = require("../schemas/delete.schema");
const mongoose_1 = __importDefault(require("mongoose"));
const abstract_model_1 = require("./abstract.model");
const collection = "roles-endpoints";
const schemaModelsMongoose = roles_endpoint_schema_1.schema.mongoose(roles_endpoint_schema_1.schema.schemas.parentSchema);
const AbstractSchemaOptions = {
    timestamps: true,
    versionKey: false,
};
const Schema = new mongoose_1.default.Schema(schemaModelsMongoose, AbstractSchemaOptions);
(0, abstract_model_1.customsSchema)(Schema);
const getItem = {
    ...roles_endpoint_schema_1.schema.swagger({
        _id: "String",
        ...roles_endpoint_schema_1.schema.schemas.parentSchema,
    }).definitions,
    endpoint: { $ref: "#/definitions/" + "EndpointsGetItemSchema" },
};
const deleteItem = delete_schema_1.schema.swagger(delete_schema_1.schema.schemas.parentSchema).definitions;
exports.RolesEndpointsModel = mongoose_1.default.model(collection, Schema);
exports.RolesEndpointsModelSwagger = {
    RolesEndpointsGetItem: {
        type: "object",
        properties: getItem,
    },
    RolesEndpointsGetItems: {
        type: "object",
        properties: getItem,
    },
    RolesEndpointsCreateItem: {
        type: "object",
        properties: getItem,
    },
    RolesEndpointsUpdateItem: {
        type: "object",
        properties: getItem,
    },
    RolesEndpointsDeleteItem: {
        type: "object",
        properties: deleteItem,
    },
};
