"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class icoTokenOfferingUpdate extends sequelize_1.Model{static initModel(e){return icoTokenOfferingUpdate.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1},offeringId:{type:sequelize_1.DataTypes.UUID,allowNull:!1,validate:{notNull:{msg:"offeringId: Offering ID cannot be null"},isUUID:{args:4,msg:"offeringId: Must be a valid UUID"}}},userId:{type:sequelize_1.DataTypes.UUID,allowNull:!1,validate:{notNull:{msg:"userId: User ID cannot be null"},isUUID:{args:4,msg:"userId: Must be a valid UUID"}}},title:{type:sequelize_1.DataTypes.STRING(191),allowNull:!1,validate:{notEmpty:{msg:"title: Title must not be empty"}}},content:{type:sequelize_1.DataTypes.TEXT,allowNull:!1,validate:{notEmpty:{msg:"content: Content must not be empty"}}},attachments:{type:sequelize_1.DataTypes.JSON,allowNull:!0}},{sequelize:e,modelName:"icoTokenOfferingUpdate",tableName:"ico_token_offering_update",timestamps:!0,paranoid:!0})}static associate(e){icoTokenOfferingUpdate.belongsTo(e.icoTokenOffering,{foreignKey:"offeringId",as:"offering",onDelete:"CASCADE",onUpdate:"CASCADE"});icoTokenOfferingUpdate.belongsTo(e.user,{foreignKey:"userId",as:"user",onDelete:"CASCADE",onUpdate:"CASCADE"})}}exports.default=icoTokenOfferingUpdate;