23 lines
689 B
C#
23 lines
689 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
|
using PlotLine.Models;
|
|
|
|
namespace PlotLine.ViewModels;
|
|
|
|
public sealed class EntityMergeViewModel
|
|
{
|
|
public Project Project { get; set; } = new();
|
|
public string SourceName { get; set; } = string.Empty;
|
|
public EntityMergeForm Form { get; set; } = new();
|
|
public IReadOnlyList<SelectListItem> TargetOptions { get; set; } = [];
|
|
}
|
|
|
|
public sealed class EntityMergeForm
|
|
{
|
|
[Range(1, int.MaxValue)]
|
|
public int SourceID { get; set; }
|
|
[Range(1, int.MaxValue, ErrorMessage = "Choose a record to merge into.")]
|
|
public int TargetID { get; set; }
|
|
public bool Confirm { get; set; }
|
|
}
|