45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
|
|
namespace AgroBase.Models
|
|
{
|
|
public class SyncDataModel
|
|
{
|
|
public string OperacaoID { get; set; }
|
|
public string Caminho
|
|
{
|
|
get
|
|
{
|
|
return Path.Combine(Variaveis.CaminhoOperacoes, OperacaoID);
|
|
}
|
|
}
|
|
public List<DateTime> InicioSync { get; set; }
|
|
public List<DateTime> FimSync { get; set; }
|
|
public bool Completo
|
|
{
|
|
get
|
|
{
|
|
return Arquivos.Any() && Arquivos.All(x => x.Syncado);
|
|
}
|
|
}
|
|
public bool Sucesso
|
|
{
|
|
get
|
|
{
|
|
return Arquivos.Any() && Arquivos.All(x => x.Syncado && x.Sucesso);
|
|
}
|
|
}
|
|
public List<SyncDataArquivoModel> Arquivos { get; set; }
|
|
}
|
|
|
|
public class SyncDataArquivoModel
|
|
{
|
|
public string Nome { get; set; }
|
|
public bool Syncado { get; set; }
|
|
public bool Sucesso { get; set; }
|
|
public DateTime? SyncadoEm { get; set; }
|
|
}
|
|
}
|