a scoring model
This commit is contained in:
parent
bdfc8d4671
commit
8a46341755
17 changed files with 832 additions and 3 deletions
32
src/Yavsc.Org/ViewModels/Kyc/DeclarationInputModel.cs
Normal file
32
src/Yavsc.Org/ViewModels/Kyc/DeclarationInputModel.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
// Yavsc.ViewModels.Kyc/DeclarationInputModel.cs
|
||||
namespace Yavsc.ViewModels.Kyc
|
||||
{
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Models.Kyc;
|
||||
|
||||
public class DeclarationInputModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Email du sujet — transformé en token immédiatement, jamais persisté.
|
||||
/// Obligatoire si ExternalToken absent.
|
||||
/// </summary>
|
||||
[EmailAddress]
|
||||
public string SubjectEmail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Token fourni par un tiers de confiance.
|
||||
/// Prioritaire sur SubjectEmail si présent.
|
||||
/// </summary>
|
||||
public string ExternalToken { get; set; }
|
||||
|
||||
[Required, MinLength(10), MaxLength(2000)]
|
||||
public string Content { get; set; }
|
||||
|
||||
[Required]
|
||||
public DeclarationSentiment Sentiment { get; set; }
|
||||
|
||||
// Validation croisée : l'un ou l'autre obligatoire
|
||||
public bool IsValid => !string.IsNullOrEmpty(SubjectEmail)
|
||||
|| !string.IsNullOrEmpty(ExternalToken);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue