Document models

This commit is contained in:
2021-12-30 22:11:20 -08:00
parent a0767fb566
commit 518191f5c6
3 changed files with 58 additions and 2 deletions

View File

@@ -6,18 +6,38 @@ using System.ComponentModel.DataAnnotations;
namespace TwilioSMSReceiver.Data.Models
{
/// <summary>
/// The SMS Model
/// </summary>
public class SMSModel
{
[Key]
public int Id { get; set; }
/// <summary>
/// Where the SMS/MMS Message was directed to
/// </summary>
[Required]
public string ReceivedNumber { get; set; }
/// <summary>
/// Where the SMS/MMS Message was sent from
/// </summary>
[Required]
public string SenderNumber { get; set; }
/// <summary>
/// When the message was received
/// </summary>
public DateTime TimeReceived { get; set; }
/// <summary>
/// Contents of the SMS message
/// </summary>
public string? MessageContents { get; set; }
/// <summary>
/// MMS Content if any
/// </summary>
public ICollection<MMSModel> MMSContent { get; set; }
/// <summary>
/// Has this message been processed - currently always false as we don't have background processing just yet
/// </summary>
public bool IsForwardedYet { get; set; }
}
@@ -25,14 +45,23 @@ namespace TwilioSMSReceiver.Data.Models
{
[Key]
public int Id { get; set; }
/// <summary>
/// Foreign key of the SMS Message
/// </summary>
public int SMSModelId { get; set; }
public SMSModel ParentSMSMessage { get; set; }
/// <summary>
/// URL of the MMS Data
/// </summary>
public string OriginalMMSData { get; set; }
}
public class MSTeamsWebHook
{
public int Id { get; set; }
/// <summary>
/// Where we sent the message to
/// </summary>
public string WebHookUri { get; set; }
}
}