68 lines
1.9 KiB
C#
68 lines
1.9 KiB
C#
#nullable disable
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
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; }
|
|
}
|
|
|
|
public class MMSModel
|
|
{
|
|
[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; }
|
|
}
|
|
}
|