"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProspectFile = exports.ProspectFileSchema = exports.EProspectFileType = void 0;
const mongoose_1 = __importDefault(require("mongoose"));
const _models_1 = require("./_models");
var EProspectFileType;
(function (EProspectFileType) {
    EProspectFileType["FILE"] = "FILE";
    EProspectFileType["AUDITOR_FILE"] = "AUDITOR_FILE";
    EProspectFileType["AUDITOR_SHARED_FILE"] = "AUDITOR_SHARED_FILE";
})(EProspectFileType || (exports.EProspectFileType = EProspectFileType = {}));
exports.ProspectFileSchema = new mongoose_1.default.Schema({
    isAccepted: {
        type: Boolean,
        default: false,
    },
    type: {
        type: String,
        required: true,
    },
    prospectId: {
        type: mongoose_1.default.Schema.Types.ObjectId,
        ref: _models_1.MODEL_NAMES.CRMProspects,
        required: true,
        index: true,
    },
    group: {
        type: String,
    },
    groupSpecial: {
        type: String,
    },
    rowId: {
        type: String,
    },
    auditorId: {
        type: mongoose_1.default.Schema.Types.ObjectId,
        ref: _models_1.MODEL_NAMES.CRMAuditors,
        index: true,
    },
    fileId: {
        type: String,
        required: true,
    },
    filename: {
        type: String,
        required: true,
    },
    isConfidential: {
        type: Boolean,
        default: false,
    },
    isDeclined: {
        type: Boolean,
        default: false,
    },
    uploadedAt: {
        type: Date,
        required: true,
    },
    uploadedBy: {
        type: String,
        required: false,
    },
    sharepointId: {
        type: String,
    },
    sharepointFolderId: {
        type: String,
    },
    sharepointDriveId: {
        type: String,
    },
    sharepointWebUrl: {
        type: String,
    },
    sharepointPath: {
        type: String,
    },
    log: {
        type: String,
    },
}, {
    timestamps: true,
    versionKey: false,
});
exports.ProspectFile = mongoose_1.default.model(_models_1.MODEL_NAMES.CRMProspectFiles, exports.ProspectFileSchema);
