26 lines
979 B
C#
26 lines
979 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Kreta.Client.Jira.Model.Response;
|
|
using Kreta.Resources;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace Kreta.Client.Jira.Model.Request
|
|
{
|
|
public class AddAttachments
|
|
{
|
|
[JsonProperty("temporaryAttachmentIds")]
|
|
public List<string> TemporaryAttachmentIds { get; set; }
|
|
|
|
[JsonProperty("public")]
|
|
public bool IsPublic => true;
|
|
|
|
[JsonProperty("additionalComment")]
|
|
public AdditionalCommentModel AdditionalComment { get; set; }
|
|
|
|
public static implicit operator AddAttachments(TemporaryAttachmentsModel temporaryAttachmentsModel) => new AddAttachments
|
|
{
|
|
TemporaryAttachmentIds = temporaryAttachmentsModel?.TemporaryAttachments.Select(attachment => attachment.TemporaryAttachmentId).ToList(),
|
|
AdditionalComment = new AdditionalCommentModel { Body = UgyfelszolgalatResource.AKovetkezoFajlokatAKretaUgyfelszolgalatBefogadta }
|
|
};
|
|
}
|
|
}
|