"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmailLandingPage = void 0;
const sequelize_typescript_1 = require("sequelize-typescript");
const business_entity_1 = require("../../business/entities/business.entity");
const email_template_entity_1 = require("../../email-template/entities/email-template.entity");
let EmailLandingPage = class EmailLandingPage extends sequelize_typescript_1.Model {
};
exports.EmailLandingPage = EmailLandingPage;
__decorate([
    (0, sequelize_typescript_1.Column)({
        type: sequelize_typescript_1.DataType.UUID,
        primaryKey: true,
        defaultValue: sequelize_typescript_1.DataType.UUIDV4,
    }),
    __metadata("design:type", String)
], EmailLandingPage.prototype, "id", void 0);
__decorate([
    (0, sequelize_typescript_1.Column)({
        type: sequelize_typescript_1.DataType.STRING,
    }),
    __metadata("design:type", String)
], EmailLandingPage.prototype, "name", void 0);
__decorate([
    (0, sequelize_typescript_1.Column)({
        type: sequelize_typescript_1.DataType.TEXT,
        defaultValue: '',
    }),
    __metadata("design:type", String)
], EmailLandingPage.prototype, "content", void 0);
__decorate([
    (0, sequelize_typescript_1.Column)({
        type: sequelize_typescript_1.DataType.STRING,
        defaultValue: '',
    }),
    __metadata("design:type", String)
], EmailLandingPage.prototype, "domain", void 0);
__decorate([
    (0, sequelize_typescript_1.Column)({
        field: 'landing_page_type',
        type: sequelize_typescript_1.DataType.ENUM('system', 'business', 'ai'),
        allowNull: false,
        defaultValue: 'system',
    }),
    __metadata("design:type", String)
], EmailLandingPage.prototype, "landingPageType", void 0);
__decorate([
    (0, sequelize_typescript_1.ForeignKey)(() => business_entity_1.Business),
    (0, sequelize_typescript_1.Column)({
        field: 'business_id',
        type: sequelize_typescript_1.DataType.UUID,
    }),
    __metadata("design:type", String)
], EmailLandingPage.prototype, "businessId", void 0);
__decorate([
    (0, sequelize_typescript_1.HasMany)(() => email_template_entity_1.EmailTemplate),
    __metadata("design:type", Array)
], EmailLandingPage.prototype, "campaigns", void 0);
exports.EmailLandingPage = EmailLandingPage = __decorate([
    (0, sequelize_typescript_1.Table)({
        tableName: 'EmailLandingPage',
        timestamps: true,
    })
], EmailLandingPage);
//# sourceMappingURL=email-landing-page.entity.js.map