"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class defaultPage extends sequelize_1.Model{static initModel(e){return defaultPage.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0},pageId:{type:sequelize_1.DataTypes.STRING,allowNull:!1,validate:{isIn:[["home","about","privacy","terms","contact"]]}},pageSource:{type:sequelize_1.DataTypes.ENUM("default","builder"),allowNull:!1,defaultValue:"default",comment:"Source type: default for regular pages, builder for builder-created pages"},type:{type:sequelize_1.DataTypes.ENUM("variables","content"),allowNull:!1},title:{type:sequelize_1.DataTypes.STRING,allowNull:!1},variables:{type:sequelize_1.DataTypes.JSON,allowNull:!0,defaultValue:{},comment:"Structured data for home page editing (texts, images, etc.)"},content:{type:sequelize_1.DataTypes.TEXT,allowNull:!0,defaultValue:"",comment:"HTML/markdown content for legal pages"},meta:{type:sequelize_1.DataTypes.JSON,allowNull:!0,defaultValue:{},comment:"SEO metadata and other page settings"},status:{type:sequelize_1.DataTypes.ENUM("active","draft"),allowNull:!1,defaultValue:"active"}},{sequelize:e,modelName:"defaultPage",tableName:"default_pages",timestamps:!0,indexes:[{unique:!0,fields:["pageId","pageSource"],name:"unique_page_source"},{fields:["status"]},{fields:["type"]}]})}}exports.default=defaultPage;