"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;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PhishingResponseService = void 0;
const common_1 = require("@nestjs/common");
const phishing_response_entity_1 = require("./entities/phishing-response.entity");
const sequelize_1 = require("@nestjs/sequelize");
let PhishingResponseService = class PhishingResponseService {
    constructor(phishingResponseRepository) {
        this.phishingResponseRepository = phishingResponseRepository;
    }
    async create(createPhishingResponseDto) {
        return await this.phishingResponseRepository.create({
            emailSentId: createPhishingResponseDto.emailId,
            actionType: createPhishingResponseDto.actionType
        });
    }
    async emailLinkCklicked(id) {
        return await this.phishingResponseRepository.create({
            emailSentId: id,
            actionType: 'click'
        });
    }
    async emailLinkFormSubmition(id) {
        return await this.phishingResponseRepository.create({
            emailSentId: id,
            actionType: 'reply'
        });
    }
    findAll() {
        return `This action returns all phishingResponse`;
    }
    findOne(id) {
        return `This action returns a #${id} phishingResponse`;
    }
    update(id, updatePhishingResponseDto) {
        return `This action updates a #${id} phishingResponse`;
    }
    remove(id) {
        return `This action removes a #${id} phishingResponse`;
    }
};
exports.PhishingResponseService = PhishingResponseService;
exports.PhishingResponseService = PhishingResponseService = __decorate([
    (0, common_1.Injectable)(),
    __param(0, (0, sequelize_1.InjectModel)(phishing_response_entity_1.PhishingResponse)),
    __metadata("design:paramtypes", [Object])
], PhishingResponseService);
//# sourceMappingURL=phishing-response.service.js.map