Newsbot.Collector/Newsbot.Collector.Domain/Dto/SubscriptionDto.cs

25 lines
737 B
C#
Raw Normal View History

2023-06-25 21:02:26 -07:00
using Newsbot.Collector.Domain.Entities;
using Newsbot.Collector.Domain.Models;
namespace Newsbot.Collector.Domain.Dto;
public class SubscriptionDto
{
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-06-25 21:02:26 -07:00
public static SubscriptionDto Convert(SubscriptionEntity model)
{
return new SubscriptionDto
{
Id = model.Id,
SourceId = model.SourceId,
DiscordWebHookId = model.DiscordWebHookId,
CodeAllowCommits = model.CodeAllowCommits,
CodeAllowReleases = model.CodeAllowReleases
};
}
}