Adding
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
namespace ReserveManagementSystemUI.Model.Configuration
|
||||
{
|
||||
public class AppConfiguration
|
||||
{
|
||||
public string AppName { get; set; }
|
||||
public string SeqApiKey { get; set; }
|
||||
public string SeqUrl { get; set; }
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ReserveManagementSystemUI.Model.Configuration
|
||||
{
|
||||
public class RmsUIConfiguration
|
||||
{
|
||||
public int DefaultImportTimeout { get; set; }
|
||||
public string RmsApiUrl { get; set; }
|
||||
public string LoanController { get; set; }
|
||||
public string ImportController { get; set; }
|
||||
public string DealerController { get; set; }
|
||||
public string AuditHistoryController { get; set; }
|
||||
public string RmsAssociatesRoles { get; set; }
|
||||
public string ReportServerUrl { get; set; }
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ReserveManagementSystemUI.Model
|
||||
{
|
||||
public class TestModel
|
||||
{
|
||||
[Required(ErrorMessage = "Action is required.")]
|
||||
public string Action { get; set; }
|
||||
public string NoResponse { get; set; }
|
||||
public string YesResponse { get; set; }
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
using FluentValidation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ReserveManagementSystemUI.Model.Validators
|
||||
{
|
||||
public class TestModelValidator : AbstractValidator<TestModel>
|
||||
{
|
||||
|
||||
public TestModelValidator()
|
||||
{
|
||||
RuleFor(tm => tm.YesResponse).NotEmpty().When(tm => tm.Action == "Yes").WithMessage("Yes response is required when yes action is selected.");
|
||||
RuleFor(tm => tm.NoResponse).NotEmpty().When(tm => tm.Action == "No").WithMessage("No response is required when no action is selected.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user