"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActionsRepository = void 0;
//#region imports
const lib_1 = require("taon/lib");
const lib_2 = require("taon-typeorm/lib");
const actions_entity_1 = require("./actions.entity");
//#endregion
let ActionsRepository = class ActionsRepository extends lib_1.TaonBaseRepository {
    entityClassResolveFn = () => actions_entity_1.Actions;
    /**
     * TODO remove this demo example method
     */
    async countEntitiesWithEvenId() {
        //#region @websqlFunc
        const result = await this.count({
            where: {
                id: (0, lib_2.Raw)(alias => `${alias} % 2 = 0`),
            },
        });
        return result;
        //#endregion
    }
};
exports.ActionsRepository = ActionsRepository;
exports.ActionsRepository = ActionsRepository = __decorate([
    (0, lib_1.TaonRepository)({
        className: 'ActionsRepository',
    })
], ActionsRepository);
//# sourceMappingURL=actions.repository.js.map