56 lines
1.7 KiB
C#
56 lines
1.7 KiB
C#
using PrevuAPIUtils;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace EnVisage.Models
|
|
{
|
|
public class IntegrationConnectionModel: IBaseModel<IntegrationConnectionInfo>
|
|
{
|
|
public Guid? ClientInfoId { get; set; }
|
|
public string Url { get; set; }
|
|
public string UserId { get; set; }
|
|
public string ImportRecordId { get; set; }
|
|
public string ImportControllerName { get; set; }
|
|
public string DecodedPassword { get
|
|
{
|
|
if (this.Password != null)
|
|
{
|
|
return EncryptionUtility.Decrypt(this.Password);
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
public string Password { get; set; }
|
|
public string AccessClass { get; set; }
|
|
public Guid Id { get; set; }
|
|
|
|
public void CopyTo(IntegrationConnectionInfo obj)
|
|
{
|
|
Id = obj.Id;
|
|
ClientInfoId = obj.ClientInfoId;
|
|
Url = obj.Url;
|
|
UserId = obj.UserId;
|
|
Password = obj.Password;
|
|
AccessClass = obj.AccessClass;
|
|
}
|
|
|
|
public static explicit operator IntegrationConnectionModel(IntegrationConnectionInfo obj)
|
|
{
|
|
if (obj == null)
|
|
return new IntegrationConnectionModel();
|
|
return new IntegrationConnectionModel()
|
|
{
|
|
Id = obj.Id,
|
|
ClientInfoId = obj.ClientInfoId,
|
|
Url = obj.Url,
|
|
UserId = obj.UserId,
|
|
Password = obj.Password,
|
|
AccessClass = obj.AccessClass,
|
|
};
|
|
}
|
|
}
|
|
}
|