Newsbot.Collector/Newsbot.Collector.Domain/Dto/SubscriptionDetailsDto.cs
James Tombleson 84b4137bdd
Features/codeproject/subscription options (#28)
* 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
2023-04-13 22:13:06 -07:00

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)
};
}
}