53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
using System;
|
|
|
|
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace TextSender_API.Models;
|
|
|
|
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
|
|
}
|
|
|
|
|
|
public class ContactCreationQueue
|
|
{
|
|
#region Properties
|
|
[BsonId]
|
|
[BsonRepresentation(BsonType.ObjectId)]
|
|
public string? Id { get; set; }
|
|
[BsonElement("filepath")]
|
|
public string? Filepath { get; set; }
|
|
[BsonElement("status")]
|
|
public string? Status { get; set; }
|
|
[BsonElement("user_id")]
|
|
public string? UserId { get; set; }
|
|
[BsonElement("date_created")]
|
|
public DateTime? DateCreated { get; set; }
|
|
[BsonElement("processed")]
|
|
public bool? Processed { get; set; }
|
|
#endregion
|
|
} |