Latest Project, Trash and setting API and sockets along with the Model clearance

This commit is contained in:
2025-05-17 10:12:18 +05:30
parent c64e5ea8b5
commit 0b30a8aeaa
66 changed files with 1109 additions and 2351 deletions

View File

@@ -1,24 +1,20 @@
import mongoose, { Schema, Document, model } from "mongoose";
import { Schema, Document } from "mongoose";
import MainModel from "../../connect/mongoose.ts";
export interface product extends Document {
export interface Product extends Document {
productName: string;
productId: string;
eventsData: [];
isArchive: boolean;
}
// Product Schema
const ProductSchema = new Schema({
productName: { type: String, required: true },
productId: { type: String, required: true },
isArchive: { type: Boolean, default: false },
});
const ProductModel = (db: string) => {
return MainModel(db, "Product", ProductSchema, "Product");
};
export default ProductModel;
export default ProductModel;