"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);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PhishingResponse = void 0;
const sequelize_typescript_1 = require("sequelize-typescript");
const email_sent_entity_1 = require("../../email-sent/entities/email-sent.entity");
let PhishingResponse = class PhishingResponse extends sequelize_typescript_1.Model {
};
exports.PhishingResponse = PhishingResponse;
__decorate([
    (0, sequelize_typescript_1.Column)({
        type: sequelize_typescript_1.DataType.UUID,
        primaryKey: true,
        defaultValue: sequelize_typescript_1.DataType.UUIDV4,
    }),
    __metadata("design:type", String)
], PhishingResponse.prototype, "id", void 0);
__decorate([
    (0, sequelize_typescript_1.ForeignKey)(() => email_sent_entity_1.EmailSent),
    (0, sequelize_typescript_1.Column)({
        field: 'email_sent_id',
        allowNull: false,
        type: sequelize_typescript_1.DataType.UUID,
    }),
    __metadata("design:type", String)
], PhishingResponse.prototype, "emailSentId", void 0);
__decorate([
    (0, sequelize_typescript_1.BelongsTo)(() => email_sent_entity_1.EmailSent),
    __metadata("design:type", email_sent_entity_1.EmailSent)
], PhishingResponse.prototype, "emailSent", void 0);
__decorate([
    (0, sequelize_typescript_1.Column)({
        field: 'action_type',
        type: sequelize_typescript_1.DataType.ENUM('click', 'download', 'reply', 'report'),
        allowNull: false,
    }),
    __metadata("design:type", String)
], PhishingResponse.prototype, "actionType", void 0);
__decorate([
    (0, sequelize_typescript_1.Column)({
        type: sequelize_typescript_1.DataType.DATE,
        defaultValue: sequelize_typescript_1.DataType.NOW,
    }),
    __metadata("design:type", Date)
], PhishingResponse.prototype, "timestamp", void 0);
__decorate([
    (0, sequelize_typescript_1.Column)({
        field: 'ip_address',
        type: sequelize_typescript_1.DataType.STRING(45),
    }),
    __metadata("design:type", String)
], PhishingResponse.prototype, "ipAddress", void 0);
__decorate([
    (0, sequelize_typescript_1.Column)({
        type: sequelize_typescript_1.DataType.JSON,
    }),
    __metadata("design:type", Object)
], PhishingResponse.prototype, "details", void 0);
__decorate([
    sequelize_typescript_1.CreatedAt,
    (0, sequelize_typescript_1.Column)({ field: 'created_at' }),
    __metadata("design:type", Date)
], PhishingResponse.prototype, "createdAt", void 0);
__decorate([
    sequelize_typescript_1.UpdatedAt,
    (0, sequelize_typescript_1.Column)({ field: 'updated_at' }),
    __metadata("design:type", Date)
], PhishingResponse.prototype, "updatedAt", void 0);
exports.PhishingResponse = PhishingResponse = __decorate([
    (0, sequelize_typescript_1.Table)({
        tableName: 'PhishingResponse',
        timestamps: true,
    })
], PhishingResponse);
//# sourceMappingURL=phishing-response.entity.js.map