using System.ComponentModel.DataAnnotations.Schema;
namespace EgwControlCenter.Core.DTO
{
//
// This is here so CodeMaid doesn't reorganize this document
//
public class AuthDataDTO
{
///
/// Master Key
///
public string MastKey { get; set; } = "";
///
/// Codice Impiego istanza SubLic
///
public string CodImp { get; set; } = "";
///
/// Chiave SubLic
///
public string AppKey { get; set; } = "";
///
/// Verifica complessiva validità richiesta:
/// CodApp presente
/// - MainKey oppure CodImp + AppKey presenti
///
[NotMapped]
public virtual bool IsValid
{
get => (!string.IsNullOrEmpty(MastKey) || (!string.IsNullOrEmpty(CodImp) && !string.IsNullOrEmpty(AppKey)));
}
}
}