James Tombleson
84b4137bdd
* Updated migrations to add new columns to subscriptions * repos updated with new columns * dto updated with new columns * subscription model was updated * DiscordNotificationJob.cs was updated to reflect subscription options * updated seed for codeproject subscriptions
21 lines
615 B
C#
21 lines
615 B
C#
using Newsbot.Collector.Domain.Models;
|
|
|
|
namespace Newsbot.Collector.Domain.Dto;
|
|
|
|
public class SubscriptionDetailsDto
|
|
{
|
|
public Guid Id { get; set; }
|
|
public SourceDto? Source { get; set; }
|
|
public DiscordWebHookDto? DiscordWebHook { get; set; }
|
|
|
|
public static SubscriptionDetailsDto Convert(SubscriptionModel subscription, SourceModel source,
|
|
DiscordWebHookModel discord)
|
|
{
|
|
return new SubscriptionDetailsDto
|
|
{
|
|
Id = subscription.Id,
|
|
Source = SourceDto.Convert(source),
|
|
DiscordWebHook = DiscordWebHookDto.Convert(discord)
|
|
};
|
|
}
|
|
} |