// /*************************************************************************** // Aaru Data Preservation Suite // ---------------------------------------------------------------------------- // // Filename : UsbVendor.cs // Author(s) : Natalia Portillo // // Component : Database. // // --[ Description ] ---------------------------------------------------------- // // Model for storing USB vendor identifiers in database. // // --[ License ] -------------------------------------------------------------- // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 2.1 of the // License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, see . // // ---------------------------------------------------------------------------- // Copyright © 2011-2022 Natalia Portillo // ****************************************************************************/ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace Aaru.Database.Models; /// USB vendor public class UsbVendor { /// Builds an empty USB vendor public UsbVendor() {} /// Builds a USB vendor with the specified parameters /// Vendor ID /// Vendor name public UsbVendor(ushort id, string vendor) { Id = id; Vendor = vendor; AddedWhen = ModifiedWhen = DateTime.UtcNow; } /// Database ID [Key] public ushort Id { get; set; } /// Vendor name public string Vendor { get; set; } /// Date when model has been added to the database public DateTime AddedWhen { get; set; } /// Date when model was last modified public DateTime ModifiedWhen { get; set; } /// List of products from this vendor public virtual ICollection Products { get; set; } }