"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.PaymentProductSchema = exports.PaymentProduct = void 0;
const mongoose_1 = require("@nestjs/mongoose");
const base_entity_1 = require("../../common/entities/base.entity");
let PaymentProduct = class PaymentProduct extends base_entity_1.BaseEntity {
    name;
    description;
    type;
    currency;
    amount;
    academicYearId;
    classId;
    isActive;
};
exports.PaymentProduct = PaymentProduct;
__decorate([
    (0, mongoose_1.Prop)({ required: true, trim: true }),
    __metadata("design:type", String)
], PaymentProduct.prototype, "name", void 0);
__decorate([
    (0, mongoose_1.Prop)({ trim: true }),
    __metadata("design:type", String)
], PaymentProduct.prototype, "description", void 0);
__decorate([
    (0, mongoose_1.Prop)({ trim: true, enum: ['tuition', 'exam', 'transport', 'other'], default: 'other' }),
    __metadata("design:type", String)
], PaymentProduct.prototype, "type", void 0);
__decorate([
    (0, mongoose_1.Prop)({ required: true, default: 'INR' }),
    __metadata("design:type", String)
], PaymentProduct.prototype, "currency", void 0);
__decorate([
    (0, mongoose_1.Prop)({ required: true, min: 1 }),
    __metadata("design:type", Number)
], PaymentProduct.prototype, "amount", void 0);
__decorate([
    (0, mongoose_1.Prop)({ required: true }),
    __metadata("design:type", String)
], PaymentProduct.prototype, "academicYearId", void 0);
__decorate([
    (0, mongoose_1.Prop)({ required: true }),
    __metadata("design:type", String)
], PaymentProduct.prototype, "classId", void 0);
__decorate([
    (0, mongoose_1.Prop)({ default: true }),
    __metadata("design:type", Boolean)
], PaymentProduct.prototype, "isActive", void 0);
exports.PaymentProduct = PaymentProduct = __decorate([
    (0, mongoose_1.Schema)({ timestamps: true })
], PaymentProduct);
exports.PaymentProductSchema = mongoose_1.SchemaFactory.createForClass(PaymentProduct);
exports.PaymentProductSchema.index({ academicYearId: 1, classId: 1, isActive: 1 });
exports.PaymentProductSchema.index({ type: 1 });
//# sourceMappingURL=payment-product.schema.js.map