From 70d60a229f4773fdfb9bc5dad865e1525efd0154 Mon Sep 17 00:00:00 2001 From: KerelOlivier Date: Mon, 23 May 2022 00:13:07 +0200 Subject: [PATCH] add: user model --- Models/User.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Models/User.cs diff --git a/Models/User.cs b/Models/User.cs new file mode 100644 index 0000000..57f1c31 --- /dev/null +++ b/Models/User.cs @@ -0,0 +1,15 @@ +using MongoDB.Bson; +using MongoDB.Bson.Serialization.Attributes; + +namespace backend.Models; + +public class User +{ + [BsonId] + [BsonRepresentation(BsonType.ObjectId)] + public string Id { get; set; } + public string Name { get; set; } + public string Email { get; set; } + public string Password { get; set; } //Bcrypt encrypted + public int Role { get; set; } //0 = user, 1 = author, 2 = admin +} \ No newline at end of file