"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MaintenancemonthmsterController = void 0;
const tslib_1 = require("tslib");
const repository_1 = require("@loopback/repository");
const rest_1 = require("@loopback/rest");
const models_1 = require("../models");
const repositories_1 = require("../repositories");
let MaintenancemonthmsterController = class MaintenancemonthmsterController {
    constructor(maintenanceMonthMasterRepository) {
        this.maintenanceMonthMasterRepository = maintenanceMonthMasterRepository;
    }
    async create(maintenanceMonthMaster) {
        return this.maintenanceMonthMasterRepository.create(maintenanceMonthMaster);
    }
    async count(where) {
        return this.maintenanceMonthMasterRepository.count(where);
    }
    async find(filter) {
        return this.maintenanceMonthMasterRepository.find(filter);
    }
    async updateAll(maintenanceMonthMaster, where) {
        return this.maintenanceMonthMasterRepository.updateAll(maintenanceMonthMaster, where);
    }
    async findById(id, filter) {
        return this.maintenanceMonthMasterRepository.findById(id, filter);
    }
    async updateById(id, maintenanceMonthMaster) {
        await this.maintenanceMonthMasterRepository.updateById(id, maintenanceMonthMaster);
    }
    async replaceById(id, maintenanceMonthMaster) {
        await this.maintenanceMonthMasterRepository.replaceById(id, maintenanceMonthMaster);
    }
    async deleteById(id) {
        await this.maintenanceMonthMasterRepository.deleteById(id);
    }
};
exports.MaintenancemonthmsterController = MaintenancemonthmsterController;
tslib_1.__decorate([
    (0, rest_1.post)('/maintenance-month-masters'),
    (0, rest_1.response)(200, {
        description: 'MaintenanceMonthMaster model instance',
        content: { 'application/json': { schema: (0, rest_1.getModelSchemaRef)(models_1.MaintenanceMonthMaster) } },
    }),
    tslib_1.__param(0, (0, rest_1.requestBody)({
        content: {
            'application/json': {
                schema: (0, rest_1.getModelSchemaRef)(models_1.MaintenanceMonthMaster, {
                    title: 'NewMaintenanceMonthMaster',
                    exclude: ['maintenanacemonthId'],
                }),
            },
        },
    })),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Object]),
    tslib_1.__metadata("design:returntype", Promise)
], MaintenancemonthmsterController.prototype, "create", null);
tslib_1.__decorate([
    (0, rest_1.get)('/maintenance-month-masters/count'),
    (0, rest_1.response)(200, {
        description: 'MaintenanceMonthMaster model count',
        content: { 'application/json': { schema: repository_1.CountSchema } },
    }),
    tslib_1.__param(0, rest_1.param.where(models_1.MaintenanceMonthMaster)),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Object]),
    tslib_1.__metadata("design:returntype", Promise)
], MaintenancemonthmsterController.prototype, "count", null);
tslib_1.__decorate([
    (0, rest_1.get)('/maintenance-month-masters'),
    (0, rest_1.response)(200, {
        description: 'Array of MaintenanceMonthMaster model instances',
        content: {
            'application/json': {
                schema: {
                    type: 'array',
                    items: (0, rest_1.getModelSchemaRef)(models_1.MaintenanceMonthMaster, { includeRelations: true }),
                },
            },
        },
    }),
    tslib_1.__param(0, rest_1.param.filter(models_1.MaintenanceMonthMaster)),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Object]),
    tslib_1.__metadata("design:returntype", Promise)
], MaintenancemonthmsterController.prototype, "find", null);
tslib_1.__decorate([
    (0, rest_1.patch)('/maintenance-month-masters'),
    (0, rest_1.response)(200, {
        description: 'MaintenanceMonthMaster PATCH success count',
        content: { 'application/json': { schema: repository_1.CountSchema } },
    }),
    tslib_1.__param(0, (0, rest_1.requestBody)({
        content: {
            'application/json': {
                schema: (0, rest_1.getModelSchemaRef)(models_1.MaintenanceMonthMaster, { partial: true }),
            },
        },
    })),
    tslib_1.__param(1, rest_1.param.where(models_1.MaintenanceMonthMaster)),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [models_1.MaintenanceMonthMaster, Object]),
    tslib_1.__metadata("design:returntype", Promise)
], MaintenancemonthmsterController.prototype, "updateAll", null);
tslib_1.__decorate([
    (0, rest_1.get)('/maintenance-month-masters/{id}'),
    (0, rest_1.response)(200, {
        description: 'MaintenanceMonthMaster model instance',
        content: {
            'application/json': {
                schema: (0, rest_1.getModelSchemaRef)(models_1.MaintenanceMonthMaster, { includeRelations: true }),
            },
        },
    }),
    tslib_1.__param(0, rest_1.param.path.number('id')),
    tslib_1.__param(1, rest_1.param.filter(models_1.MaintenanceMonthMaster, { exclude: 'where' })),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Number, Object]),
    tslib_1.__metadata("design:returntype", Promise)
], MaintenancemonthmsterController.prototype, "findById", null);
tslib_1.__decorate([
    (0, rest_1.patch)('/maintenance-month-masters/{id}'),
    (0, rest_1.response)(204, {
        description: 'MaintenanceMonthMaster PATCH success',
    }),
    tslib_1.__param(0, rest_1.param.path.number('id')),
    tslib_1.__param(1, (0, rest_1.requestBody)({
        content: {
            'application/json': {
                schema: (0, rest_1.getModelSchemaRef)(models_1.MaintenanceMonthMaster, { partial: true }),
            },
        },
    })),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Number, models_1.MaintenanceMonthMaster]),
    tslib_1.__metadata("design:returntype", Promise)
], MaintenancemonthmsterController.prototype, "updateById", null);
tslib_1.__decorate([
    (0, rest_1.put)('/maintenance-month-masters/{id}'),
    (0, rest_1.response)(204, {
        description: 'MaintenanceMonthMaster PUT success',
    }),
    tslib_1.__param(0, rest_1.param.path.number('id')),
    tslib_1.__param(1, (0, rest_1.requestBody)()),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Number, models_1.MaintenanceMonthMaster]),
    tslib_1.__metadata("design:returntype", Promise)
], MaintenancemonthmsterController.prototype, "replaceById", null);
tslib_1.__decorate([
    (0, rest_1.del)('/maintenance-month-masters/{id}'),
    (0, rest_1.response)(204, {
        description: 'MaintenanceMonthMaster DELETE success',
    }),
    tslib_1.__param(0, rest_1.param.path.number('id')),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Number]),
    tslib_1.__metadata("design:returntype", Promise)
], MaintenancemonthmsterController.prototype, "deleteById", null);
exports.MaintenancemonthmsterController = MaintenancemonthmsterController = tslib_1.__decorate([
    tslib_1.__param(0, (0, repository_1.repository)(repositories_1.MaintenanceMonthMasterRepository)),
    tslib_1.__metadata("design:paramtypes", [repositories_1.MaintenanceMonthMasterRepository])
], MaintenancemonthmsterController);
//# sourceMappingURL=maintenancemonthmster.controller.js.map