using DAL.Models; using System.ComponentModel.DataAnnotations; namespace API.DTO.Base.Update { public class SavedEventUpdateDTO : IUpdateAdaptable { [MaxLength(64)] public string? name { get; set; } public ulong? bgColorId { get; set; } public ulong? fgColorId { get; set; } public UnSettable? imageId { get; set; } public void adaptModel(ref SavedEvent model) { if (name != null) model.name = name; if (bgColorId != null) model.bgColorId = (ulong)bgColorId; if (fgColorId != null) model.fgColorId = (ulong)fgColorId; if (imageId != null) model.imageId = imageId.Value.value; } } }