summaryrefslogtreecommitdiff
path: root/src/models/product/product.schema.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/product/product.schema.ts')
-rw-r--r--src/models/product/product.schema.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/models/product/product.schema.ts b/src/models/product/product.schema.ts
new file mode 100644
index 0000000..8f488f3
--- /dev/null
+++ b/src/models/product/product.schema.ts
@@ -0,0 +1,18 @@
+import { Document, Schema, Types } from 'mongoose';
+
+export interface ProductSchema extends Document {
+ name: string;
+ description: string;
+ price: number;
+ quantity: number;
+ specs: any;
+}
+
+export const productSchema = new Schema({
+ name: String,
+ description: String,
+ price: Number,
+ quantity: Number,
+ specs: Object
+}, { timestamps: true });
+