2023-02-26 09:40:04 -08:00
|
|
|
using Newsbot.Collector.Domain.Models;
|
|
|
|
|
|
|
|
namespace Newsbot.Collector.Domain.Dto;
|
|
|
|
|
|
|
|
public class SubscriptionDto
|
|
|
|
{
|
2023-04-13 22:13:06 -07:00
|
|
|
public Guid Id { get; set; }
|
|
|
|
public Guid SourceId { get; set; }
|
|
|
|
public Guid DiscordWebHookId { get; set; }
|
|
|
|
public bool CodeAllowReleases { get; set; }
|
|
|
|
public bool CodeAllowCommits { get; set; }
|
2023-02-26 09:40:04 -08:00
|
|
|
|
|
|
|
public static SubscriptionDto Convert(SubscriptionModel model)
|
|
|
|
{
|
|
|
|
return new SubscriptionDto
|
|
|
|
{
|
2023-04-13 22:13:06 -07:00
|
|
|
Id = model.Id,
|
|
|
|
SourceId = model.SourceId,
|
|
|
|
DiscordWebHookId = model.DiscordWebHookId,
|
|
|
|
CodeAllowCommits = model.CodeAllowCommits,
|
|
|
|
CodeAllowReleases = model.CodeAllowReleases
|
2023-02-26 09:40:04 -08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|