Skip to content

Commit 8ae4cf4

Browse files
committed
➕ADD: Modelo User
Integracion del schema de usuarios Issue #4
1 parent b427eb1 commit 8ae4cf4

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

app/src/models/user.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { model as Model, Schema } from "mongoose";
2+
3+
/**
4+
* Esquema correspondiente al registro de un user.
5+
*
6+
* @return {Mongoose Schema}.
7+
*/
8+
const SCHEMA = new Schema({
9+
name: { type: String, required: true },
10+
lastName: { type: String, required: true },
11+
email: { type: String, required: true },
12+
phoneNumber: { type: String, default: "00-00-00-00-00" },
13+
});
14+
15+
// Se indica el nombre de la colección y esquema a utillizar
16+
export default Model("user", SCHEMA);

0 commit comments

Comments
 (0)