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
24 lines
695 B
C#
24 lines
695 B
C#
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; }
|
|
|
|
public static SubscriptionDto Convert(SubscriptionModel model)
|
|
{
|
|
return new SubscriptionDto
|
|
{
|
|
Id = model.Id,
|
|
SourceId = model.SourceId,
|
|
DiscordWebHookId = model.DiscordWebHookId,
|
|
CodeAllowCommits = model.CodeAllowCommits,
|
|
CodeAllowReleases = model.CodeAllowReleases
|
|
};
|
|
}
|
|
} |