Files
Aaru/DiscImageChef.Server/Models/UsbProduct.cs

31 lines
868 B
C#
Raw Normal View History

using System;
using System.ComponentModel.DataAnnotations;
2018-12-24 21:13:02 +00:00
using System.ComponentModel.DataAnnotations.Schema;
namespace DiscImageChef.Server.Models
{
public class UsbProduct
{
public UsbProduct() { }
2018-12-24 21:13:02 +00:00
public UsbProduct(UsbVendor vendor, ushort id, string product)
{
ProductId = id;
Product = product;
AddedWhen = ModifiedWhen = DateTime.UtcNow;
2018-12-24 21:13:02 +00:00
Vendor = vendor;
}
[Key]
2018-12-24 21:13:02 +00:00
public int Id { get; set; }
[Index]
public int ProductId { get; set; }
public string Product { get; set; }
public DateTime AddedWhen { get; set; }
[Index]
public DateTime ModifiedWhen { get; set; }
2018-12-24 21:13:02 +00:00
[Index]
public int VendorId { get; set; }
public virtual UsbVendor Vendor { get; set; }
}
}