diff options
author | rohan09-raj <rajrohan1914@gmail.com> | 2022-08-02 00:06:39 +0530 |
---|---|---|
committer | rohan09-raj <rajrohan1914@gmail.com> | 2022-08-02 00:06:39 +0530 |
commit | 5f8f6f98c2c47ca878aadb893b0d64a0c66316aa (patch) | |
tree | c32ee819c446a47f9eed15d44330a19d31b6e9b3 /server | |
parent | 337b0a2a7d358a597e114197cf5d12e8ed81a19e (diff) |
added useState and made input functional
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/users.js | 0 | ||||
-rw-r--r-- | server/models/users.js | 26 | ||||
-rw-r--r-- | server/routes/users.js | 8 |
3 files changed, 34 insertions, 0 deletions
diff --git a/server/controllers/users.js b/server/controllers/users.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/server/controllers/users.js diff --git a/server/models/users.js b/server/models/users.js new file mode 100644 index 0000000..f78b7d7 --- /dev/null +++ b/server/models/users.js @@ -0,0 +1,26 @@ +import mongoose from 'mongoose'; + +const userSchema = mongoose.Schema({ + id: String, + aadhaarNumber: String, + indianResident: Boolean, + name: String, + gender: String, + dob: { + type: Date, + }, + mobile: String, + email: String, + address: String, + photo: String, + documents: Object, + biometrics: Object, + createdAt: { + type: Date, + default: new Date(), + }, +}); + +const UserDetails = mongoose.model('UserDetails', userSchema); + +export default UserDetails; diff --git a/server/routes/users.js b/server/routes/users.js new file mode 100644 index 0000000..55f846b --- /dev/null +++ b/server/routes/users.js @@ -0,0 +1,8 @@ +import Express from 'express'; + +const router = Express.Router(); + +router.post('/user'); +router.get('/user'); + +export default router; |