"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class p2pActivityLog extends sequelize_1.Model{static initModel(e){return p2pActivityLog.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1},userId:{type:sequelize_1.DataTypes.UUID,allowNull:!0},type:{type:sequelize_1.DataTypes.STRING(50),allowNull:!1,validate:{notEmpty:{msg:"Type must not be empty"}}},action:{type:sequelize_1.DataTypes.STRING(50),allowNull:!1,validate:{notEmpty:{msg:"Action must not be empty"}}},details:{type:sequelize_1.DataTypes.TEXT,allowNull:!0},relatedEntity:{type:sequelize_1.DataTypes.STRING(50),allowNull:!0},relatedEntityId:{type:sequelize_1.DataTypes.UUID,allowNull:!0}},{sequelize:e,modelName:"p2pActivityLog",tableName:"p2p_activity_logs",timestamps:!0,paranoid:!0})}static associate(e){p2pActivityLog.belongsTo(e.user,{as:"user",foreignKey:"userId",onDelete:"CASCADE",onUpdate:"CASCADE"})}}exports.default=p2pActivityLog;