26 lines
638 B
C#
26 lines
638 B
C#
using DAL.Models;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace API.DTO.Base.Update
|
|
{
|
|
public class SavedEventUpdateDTO : IUpdateAdaptable<SavedEvent>
|
|
{
|
|
[MaxLength(64)]
|
|
public string? name { get; set; }
|
|
|
|
public ulong? bgColorId { get; set; }
|
|
|
|
public ulong? fgColorId { get; set; }
|
|
|
|
public UnSettable<ulong?>? 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;
|
|
}
|
|
}
|
|
}
|