47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace TextSender_API.Models;
|
|
|
|
public class User
|
|
{
|
|
#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("phone_number")]
|
|
public string? PhoneNumber { get; set; }
|
|
[BsonElement("username")]
|
|
[JsonProperty("username")]
|
|
public string? Username { get; set; }
|
|
[BsonElement("password")]
|
|
[JsonProperty("password")]
|
|
public string? Password { get; set; }
|
|
[BsonElement("datecreated")]
|
|
[JsonProperty("date_created")]
|
|
public DateTime? DateCreated { get; set; }
|
|
#endregion
|
|
}
|
|
|
|
public class Salt
|
|
{
|
|
#region Properties
|
|
[BsonId]
|
|
[BsonRepresentation(BsonType.ObjectId)]
|
|
public string? Id { get; set; }
|
|
[BsonElement("key")]
|
|
public byte[]? Key { get; set; }
|
|
[BsonElement("user_id")]
|
|
public string? UserId { get; set; }
|
|
#endregion
|
|
}
|