mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add constructors from device report version 2 to device and report models.
This commit is contained in:
@@ -5,6 +5,20 @@ namespace DiscImageChef.Database.Models
|
|||||||
{
|
{
|
||||||
public class Device : DeviceReportV2
|
public class Device : DeviceReportV2
|
||||||
{
|
{
|
||||||
|
public Device(DeviceReportV2 report)
|
||||||
|
{
|
||||||
|
ATA = report.ATA;
|
||||||
|
ATAPI = report.ATA;
|
||||||
|
CompactFlash = report.CompactFlash;
|
||||||
|
FireWire = report.FireWire;
|
||||||
|
LastSynchronized = DateTime.UtcNow;
|
||||||
|
MultiMediaCard = report.MultiMediaCard;
|
||||||
|
PCMCIA = report.PCMCIA;
|
||||||
|
SCSI = report.SCSI;
|
||||||
|
SecureDigital = report.SecureDigital;
|
||||||
|
USB = report.USB;
|
||||||
|
}
|
||||||
|
|
||||||
public DateTime LastSynchronized { get; set; }
|
public DateTime LastSynchronized { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,21 @@ namespace DiscImageChef.Database.Models
|
|||||||
{
|
{
|
||||||
public class Report : DeviceReportV2
|
public class Report : DeviceReportV2
|
||||||
{
|
{
|
||||||
|
public Report(DeviceReportV2 report)
|
||||||
|
{
|
||||||
|
ATA = report.ATA;
|
||||||
|
ATAPI = report.ATA;
|
||||||
|
CompactFlash = report.CompactFlash;
|
||||||
|
FireWire = report.FireWire;
|
||||||
|
Created = DateTime.UtcNow;
|
||||||
|
MultiMediaCard = report.MultiMediaCard;
|
||||||
|
PCMCIA = report.PCMCIA;
|
||||||
|
SCSI = report.SCSI;
|
||||||
|
SecureDigital = report.SecureDigital;
|
||||||
|
USB = report.USB;
|
||||||
|
Uploaded = false;
|
||||||
|
}
|
||||||
|
|
||||||
public DateTime Created { get; set; }
|
public DateTime Created { get; set; }
|
||||||
public bool Uploaded { get; set; }
|
public bool Uploaded { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user