20 lines
607 B
C#
20 lines
607 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)
|
||
|
};
|
||
|
}
|
||
|
}
|