const mongoose = require("mongoose");
const timestamp = require("mongoose-timestamp");
const mongoosePaginate = require("mongoose-paginate-v2");

const modelSchema = new mongoose.Schema({
    type: { type: String, enum: ["course", "product", "service"], required: true },
    tax: { type: Number, required: true, default: 9 }, // درصد مالیات
    is_active: { type: Boolean, default: true },
 
});

modelSchema.plugin(timestamp);
modelSchema.plugin(mongoosePaginate);
const PostModel = mongoose.model("Tax", modelSchema);
module.exports = PostModel;
