Added endpoint to create new Contact
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace TextSender_API.Models;
|
||||
|
||||
@@ -10,17 +11,23 @@ public class Contact
|
||||
#region Properties
|
||||
[BsonId]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
[JsonProperty("id")]
|
||||
public string? Id { get; set; }
|
||||
[BsonElement("firstname")]
|
||||
[JsonProperty("firstname")]
|
||||
public string? Firstname { get; set; }
|
||||
[BsonElement("lastname")]
|
||||
[JsonProperty("lastname")]
|
||||
public string? Lastname { get; set; }
|
||||
[BsonElement("phonenumber")]
|
||||
[JsonProperty("phonenumber")]
|
||||
public string? PhoneNumber { get; set; }
|
||||
[BsonElement("date_created")]
|
||||
[JsonProperty("date_created")]
|
||||
public DateTime DateCreated { get; set; }
|
||||
// [BsonRepresentation(BsonType.ObjectId)]
|
||||
[BsonElement("user_id")]
|
||||
[JsonProperty("user_id")]
|
||||
public string? UserID { get; set; }
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user