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