"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class mailwizardTemplate extends sequelize_1.Model{static initModel(e){return mailwizardTemplate.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1},name:{type:sequelize_1.DataTypes.STRING(191),allowNull:!1,validate:{notEmpty:{msg:"name: Name cannot be empty"}}},content:{type:sequelize_1.DataTypes.TEXT("long"),allowNull:!1,validate:{notEmpty:{msg:"content: Content cannot be empty"}}},design:{type:sequelize_1.DataTypes.TEXT("long"),allowNull:!1,validate:{notEmpty:{msg:"design: Design description cannot be empty"}}}},{sequelize:e,modelName:"mailwizardTemplate",tableName:"mailwizard_template",timestamps:!0,paranoid:!0,indexes:[{name:"PRIMARY",unique:!0,using:"BTREE",fields:[{name:"id"}]}]})}static associate(e){mailwizardTemplate.hasMany(e.mailwizardCampaign,{as:"mailwizardCampaigns",foreignKey:"templateId",onDelete:"CASCADE",onUpdate:"CASCADE"})}}exports.default=mailwizardTemplate;