-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pradyuman072
authored and
Pradyuman072
committed
Jan 5, 2025
1 parent
e134e6f
commit b09822b
Showing
107 changed files
with
17,457 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/app/(category)/node/(projects)/mobile-shopping-website/backend/models/product.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const mongoose = require('mongoose'); | ||
|
||
const ProductSchema = new mongoose.Schema({ | ||
id:{type:Number}, | ||
brand: { type: String, required: true }, | ||
model: { type: String, required: true }, | ||
price: { type: Number, required: true }, | ||
description: { type: String, required: true }, | ||
imageUrl: { type: String, required: true } | ||
}); | ||
|
||
module.exports = mongoose.model('Product', ProductSchema); |
10 changes: 10 additions & 0 deletions
10
src/app/(category)/node/(projects)/mobile-shopping-website/backend/models/user.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const mongoose = require('mongoose'); | ||
|
||
const UserSchema = new mongoose.Schema({ | ||
username: { type: String, required: true }, | ||
password: { type: String, required: true }, | ||
email: { type: String, required: true }, | ||
shippingAddress: { type: String, required: true } | ||
}); | ||
|
||
module.exports = mongoose.model('User ', UserSchema); |
Oops, something went wrong.