using Furion.JsonSerialization;
using YBEE.EQM.Core;
namespace YBEE.EQM.Application;
///
/// 附件处理工具类
///
public static class AttachementUtil
{
///
/// 获取附件列表
///
public static List GetList(string attachments)
{
return JSON.Deserialize>(attachments);
}
///
/// 向附件中插入新记录
///
public static string InsertInto(string attachments, AttachmentItem newItem)
{
var attachmentList = GetList(attachments);
attachmentList.Add(newItem);
return JSON.Serialize(attachmentList);
}
}