150 lines
6.0 KiB
C#
150 lines
6.0 KiB
C#
namespace eSPJ.Models
|
|
{
|
|
public enum JenisSampah
|
|
{
|
|
Organik,
|
|
Anorganik,
|
|
Residu
|
|
}
|
|
|
|
public class TimbanganItem
|
|
{
|
|
public string? FotoFileName { get; set; }
|
|
public List<decimal> Berat { get; set; } = new();
|
|
public List<string> LokasiAngkut { get; set; } = new();
|
|
public List<JenisSampah> JenisSampah { get; set; } = new();
|
|
public bool IsUploaded { get; set; }
|
|
public DateTime? WaktuUpload { get; set; }
|
|
}
|
|
|
|
public class TpsData
|
|
{
|
|
public string Name { get; set; } = string.Empty;
|
|
public int Index { get; set; }
|
|
public string Latitude { get; set; } = string.Empty;
|
|
public string Longitude { get; set; } = string.Empty;
|
|
public string AlamatJalan { get; set; } = string.Empty;
|
|
public string WaktuKedatangan { get; set; } = string.Empty;
|
|
public List<string> FotoKedatangan { get; set; } = new();
|
|
public bool FotoKedatanganUploaded { get; set; }
|
|
public List<TimbanganItem> Timbangan { get; set; } = new();
|
|
public decimal TotalOrganik { get; set; }
|
|
public decimal TotalAnorganik { get; set; }
|
|
public decimal TotalResidu { get; set; }
|
|
public decimal TotalTimbangan { get; set; }
|
|
public List<string> FotoPetugas { get; set; } = new();
|
|
public bool FotoPetugasUploaded { get; set; }
|
|
public string NamaPetugas { get; set; } = string.Empty;
|
|
public bool Submitted { get; set; }
|
|
}
|
|
|
|
public class DetailPenjemputanRequest
|
|
{
|
|
public string TpsName { get; set; } = string.Empty;
|
|
public string Latitude { get; set; } = string.Empty;
|
|
public string Longitude { get; set; } = string.Empty;
|
|
public string AlamatJalan { get; set; } = string.Empty;
|
|
public string WaktuKedatangan { get; set; } = string.Empty;
|
|
public decimal TotalTimbangan { get; set; }
|
|
public decimal TotalOrganik { get; set; }
|
|
public decimal TotalAnorganik { get; set; }
|
|
public decimal TotalResidu { get; set; }
|
|
public string NamaPetugas { get; set; } = string.Empty;
|
|
public List<IFormFile>? FotoKedatangan { get; set; }
|
|
public List<IFormFile>? FotoTimbangan { get; set; }
|
|
public List<decimal>? BeratTimbangan { get; set; }
|
|
public List<string>? JenisSampahList { get; set; }
|
|
public List<IFormFile>? FotoPetugas { get; set; }
|
|
}
|
|
|
|
public class DetailPenjemputanResponse
|
|
{
|
|
public bool Success { get; set; }
|
|
public string Message { get; set; } = string.Empty;
|
|
public object? Data { get; set; }
|
|
}
|
|
|
|
public class OcrTimbanganRequest
|
|
{
|
|
public IFormFile? Foto { get; set; }
|
|
}
|
|
|
|
public class OcrTimbanganResponse
|
|
{
|
|
public bool Success { get; set; }
|
|
public string? Weight { get; set; }
|
|
public string? Raw { get; set; }
|
|
public string Message { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class DraftTimbanganItem
|
|
{
|
|
public decimal Berat { get; set; }
|
|
public string JenisSampah { get; set; } = "Residu";
|
|
public string FotoFileName { get; set; } = string.Empty;
|
|
public bool Uploaded { get; set; }
|
|
public string OcrInfo { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class DraftPenjemputanNonTps
|
|
{
|
|
public string SessionKey { get; set; } = string.Empty;
|
|
public string LokasiAngkutId { get; set; } = string.Empty;
|
|
public string SpjDetailId { get; set; } = string.Empty;
|
|
public string Latitude { get; set; } = string.Empty;
|
|
public string Longitude { get; set; } = string.Empty;
|
|
public string AlamatJalan { get; set; } = string.Empty;
|
|
public string WaktuKedatangan { get; set; } = string.Empty;
|
|
public List<string> FotoKedatanganFileNames { get; set; } = new();
|
|
public bool FotoKedatanganUploaded { get; set; }
|
|
public List<DraftTimbanganItem> Timbangan { get; set; } = new();
|
|
public decimal TotalOrganik { get; set; }
|
|
public decimal TotalAnorganik { get; set; }
|
|
public decimal TotalResidu { get; set; }
|
|
public decimal TotalTimbangan { get; set; }
|
|
public List<string> FotoPetugasFileNames { get; set; } = new();
|
|
public bool FotoPetugasUploaded { get; set; }
|
|
public string NamaPetugas { get; set; } = string.Empty;
|
|
public bool Submitted { get; set; }
|
|
public DateTime UpdatedAt { get; set; } = DateTime.Now;
|
|
}
|
|
|
|
public class DraftSaveRequest
|
|
{
|
|
public string DraftKey { get; set; } = string.Empty;
|
|
public string SessionKey { get; set; } = string.Empty;
|
|
public string LokasiAngkutId { get; set; } = string.Empty;
|
|
public string SpjDetailId { get; set; } = string.Empty;
|
|
public string Latitude { get; set; } = string.Empty;
|
|
public string Longitude { get; set; } = string.Empty;
|
|
public string AlamatJalan { get; set; } = string.Empty;
|
|
public string WaktuKedatangan { get; set; } = string.Empty;
|
|
public bool FotoKedatanganUploaded { get; set; }
|
|
public List<string> FotoKedatanganFileNames { get; set; } = new();
|
|
public List<DraftTimbanganItem> Timbangan { get; set; } = new();
|
|
public decimal TotalOrganik { get; set; }
|
|
public decimal TotalAnorganik { get; set; }
|
|
public decimal TotalResidu { get; set; }
|
|
public decimal TotalTimbangan { get; set; }
|
|
public bool FotoPetugasUploaded { get; set; }
|
|
public List<string> FotoPetugasFileNames { get; set; } = new();
|
|
public string NamaPetugas { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class DraftSaveResponse
|
|
{
|
|
public bool Success { get; set; }
|
|
public string Message { get; set; } = string.Empty;
|
|
public string? DraftKey { get; set; }
|
|
public string? SessionKey { get; set; }
|
|
}
|
|
|
|
public class DraftLoadResponse
|
|
{
|
|
public bool Success { get; set; }
|
|
public bool HasDraft { get; set; }
|
|
public DraftPenjemputanNonTps? Draft { get; set; }
|
|
public string Message { get; set; } = string.Empty;
|
|
}
|
|
}
|