"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class faq extends sequelize_1.Model{static initModel(e){return faq.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1},question:{type:sequelize_1.DataTypes.TEXT,allowNull:!1,validate:{notEmpty:{msg:"question: Question must not be empty"}}},answer:{type:sequelize_1.DataTypes.TEXT,allowNull:!1,validate:{notEmpty:{msg:"answer: Answer must not be empty"}}},image:{type:sequelize_1.DataTypes.STRING(191),allowNull:!0},category:{type:sequelize_1.DataTypes.STRING(191),allowNull:!1,validate:{notEmpty:{msg:"category: Category must not be empty"}}},tags:{type:sequelize_1.DataTypes.JSON,allowNull:!0,defaultValue:[]},status:{type:sequelize_1.DataTypes.BOOLEAN,allowNull:!1,defaultValue:!0},order:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0,validate:{isInt:{msg:"order: Must be an integer"},min:{args:[0],msg:"order: Cannot be negative"}}},pagePath:{type:sequelize_1.DataTypes.STRING(191),allowNull:!1,validate:{notEmpty:{msg:"pagePath: Page path must not be empty"}}},relatedFaqIds:{type:sequelize_1.DataTypes.JSON,allowNull:!0,defaultValue:[]},views:{type:sequelize_1.DataTypes.INTEGER,allowNull:!0,defaultValue:0,validate:{isInt:{msg:"views: Must be an integer"},min:{args:[0],msg:"views: Cannot be negative"}}}},{sequelize:e,modelName:"faq",tableName:"faqs",paranoid:!0,timestamps:!0,indexes:[{name:"PRIMARY",unique:!0,fields:[{name:"id"}]},{name:"faqs_category_idx",fields:[{name:"category"}]},{name:"faqs_pagePath_idx",fields:[{name:"pagePath"}]},{name:"faqs_order_idx",fields:[{name:"order"}]}]})}static associate(e){faq.hasMany(e.faqFeedback,{foreignKey:"faqId",as:"feedbacks",onDelete:"CASCADE",onUpdate:"CASCADE"})}}exports.default=faq;