"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.NotificationPreferences = void 0;
const typeorm_1 = require("typeorm");
const base_entity_1 = require("./base.entity");
const user_entity_1 = require("./user.entity");
let NotificationPreferences = class NotificationPreferences extends base_entity_1.BaseEntity {
};
exports.NotificationPreferences = NotificationPreferences;
__decorate([
    (0, typeorm_1.Column)({ name: 'user_id', type: 'varchar', length: 36, unique: true }),
    __metadata("design:type", String)
], NotificationPreferences.prototype, "userId", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'expense_added', type: 'boolean', default: true }),
    __metadata("design:type", Boolean)
], NotificationPreferences.prototype, "expenseAdded", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'settlement_reminder', type: 'boolean', default: true }),
    __metadata("design:type", Boolean)
], NotificationPreferences.prototype, "settlementReminder", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'email_notifications', type: 'boolean', default: true }),
    __metadata("design:type", Boolean)
], NotificationPreferences.prototype, "emailNotifications", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: 'push_notifications', type: 'boolean', default: false }),
    __metadata("design:type", Boolean)
], NotificationPreferences.prototype, "pushNotifications", void 0);
__decorate([
    (0, typeorm_1.OneToOne)(() => user_entity_1.User, (u) => u.notificationPreferences, { onDelete: 'CASCADE' }),
    (0, typeorm_1.JoinColumn)({ name: 'user_id' }),
    __metadata("design:type", user_entity_1.User)
], NotificationPreferences.prototype, "user", void 0);
exports.NotificationPreferences = NotificationPreferences = __decorate([
    (0, typeorm_1.Entity)('notification_preferences')
], NotificationPreferences);
//# sourceMappingURL=notification-preferences.entity.js.map