"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OtherrommmasterController = 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 OtherrommmasterController = class OtherrommmasterController {
    constructor(otherRoomMasterRepository) {
        this.otherRoomMasterRepository = otherRoomMasterRepository;
    }
    async create(otherRoomMaster) {
        return this.otherRoomMasterRepository.create(otherRoomMaster);
    }
    async count(where) {
        return this.otherRoomMasterRepository.count(where);
    }
    async find(filter) {
        return this.otherRoomMasterRepository.find(filter);
    }
    async updateAll(otherRoomMaster, where) {
        return this.otherRoomMasterRepository.updateAll(otherRoomMaster, where);
    }
    async findById(id, filter) {
        return this.otherRoomMasterRepository.findById(id, filter);
    }
    async updateById(id, otherRoomMaster) {
        await this.otherRoomMasterRepository.updateById(id, otherRoomMaster);
    }
    async replaceById(id, otherRoomMaster) {
        await this.otherRoomMasterRepository.replaceById(id, otherRoomMaster);
    }
    async deleteById(id) {
        await this.otherRoomMasterRepository.deleteById(id);
    }
};
exports.OtherrommmasterController = OtherrommmasterController;
tslib_1.__decorate([
    (0, rest_1.post)('/other-room-masters'),
    (0, rest_1.response)(200, {
        description: 'OtherRoomMaster model instance',
        content: { 'application/json': { schema: (0, rest_1.getModelSchemaRef)(models_1.OtherRoomMaster) } },
    }),
    tslib_1.__param(0, (0, rest_1.requestBody)({
        content: {
            'application/json': {
                schema: (0, rest_1.getModelSchemaRef)(models_1.OtherRoomMaster, {
                    title: 'NewOtherRoomMaster',
                    exclude: ['otherRoomId'],
                }),
            },
        },
    })),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Object]),
    tslib_1.__metadata("design:returntype", Promise)
], OtherrommmasterController.prototype, "create", null);
tslib_1.__decorate([
    (0, rest_1.get)('/other-room-masters/count'),
    (0, rest_1.response)(200, {
        description: 'OtherRoomMaster model count',
        content: { 'application/json': { schema: repository_1.CountSchema } },
    }),
    tslib_1.__param(0, rest_1.param.where(models_1.OtherRoomMaster)),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Object]),
    tslib_1.__metadata("design:returntype", Promise)
], OtherrommmasterController.prototype, "count", null);
tslib_1.__decorate([
    (0, rest_1.get)('/other-room-masters'),
    (0, rest_1.response)(200, {
        description: 'Array of OtherRoomMaster model instances',
        content: {
            'application/json': {
                schema: {
                    type: 'array',
                    items: (0, rest_1.getModelSchemaRef)(models_1.OtherRoomMaster, { includeRelations: true }),
                },
            },
        },
    }),
    tslib_1.__param(0, rest_1.param.filter(models_1.OtherRoomMaster)),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Object]),
    tslib_1.__metadata("design:returntype", Promise)
], OtherrommmasterController.prototype, "find", null);
tslib_1.__decorate([
    (0, rest_1.patch)('/other-room-masters'),
    (0, rest_1.response)(200, {
        description: 'OtherRoomMaster 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.OtherRoomMaster, { partial: true }),
            },
        },
    })),
    tslib_1.__param(1, rest_1.param.where(models_1.OtherRoomMaster)),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [models_1.OtherRoomMaster, Object]),
    tslib_1.__metadata("design:returntype", Promise)
], OtherrommmasterController.prototype, "updateAll", null);
tslib_1.__decorate([
    (0, rest_1.get)('/other-room-masters/{id}'),
    (0, rest_1.response)(200, {
        description: 'OtherRoomMaster model instance',
        content: {
            'application/json': {
                schema: (0, rest_1.getModelSchemaRef)(models_1.OtherRoomMaster, { includeRelations: true }),
            },
        },
    }),
    tslib_1.__param(0, rest_1.param.path.number('id')),
    tslib_1.__param(1, rest_1.param.filter(models_1.OtherRoomMaster, { exclude: 'where' })),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Number, Object]),
    tslib_1.__metadata("design:returntype", Promise)
], OtherrommmasterController.prototype, "findById", null);
tslib_1.__decorate([
    (0, rest_1.patch)('/other-room-masters/{id}'),
    (0, rest_1.response)(204, {
        description: 'OtherRoomMaster 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.OtherRoomMaster, { partial: true }),
            },
        },
    })),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Number, models_1.OtherRoomMaster]),
    tslib_1.__metadata("design:returntype", Promise)
], OtherrommmasterController.prototype, "updateById", null);
tslib_1.__decorate([
    (0, rest_1.put)('/other-room-masters/{id}'),
    (0, rest_1.response)(204, {
        description: 'OtherRoomMaster 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.OtherRoomMaster]),
    tslib_1.__metadata("design:returntype", Promise)
], OtherrommmasterController.prototype, "replaceById", null);
tslib_1.__decorate([
    (0, rest_1.del)('/other-room-masters/{id}'),
    (0, rest_1.response)(204, {
        description: 'OtherRoomMaster 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)
], OtherrommmasterController.prototype, "deleteById", null);
exports.OtherrommmasterController = OtherrommmasterController = tslib_1.__decorate([
    tslib_1.__param(0, (0, repository_1.repository)(repositories_1.OtherRoomMasterRepository)),
    tslib_1.__metadata("design:paramtypes", [repositories_1.OtherRoomMasterRepository])
], OtherrommmasterController);
//# sourceMappingURL=otherrommmaster.controller.js.map