Skip to content

Commit 27c8a8c

Browse files
committed
Add user schema for mongo db
1 parent 67d23e0 commit 27c8a8c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/user/user.model.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { string } from 'joi';
2+
import * as mongoose from 'mongoose';
3+
4+
export const UserSchema = new mongoose.Schema({
5+
email: { type: String, required: true },
6+
phoneNumber: { type: String, required: true },
7+
name: { type: String, required: true },
8+
password: { type: String, required: true },
9+
});
10+
11+
export interface User extends mongoose.Document {
12+
email: string;
13+
phoneNumber: string;
14+
name: string;
15+
password: String;
16+
}

0 commit comments

Comments
 (0)