using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Hydra.Data.Model
{
    public partial class ItemDevice
    {
        #region Constructors
        /// <summary>
        /// Initializes a new instance of the <see cref="ItemDevice"/> class.
        /// </summary>
        public ItemDevice()
        {
        }
        #endregion

        #region Keys
        /// <summary>
        /// Gets or sets the ID.
        /// </summary>
        /// <value>The ID.</value>
        [Key]
        public int ID { get; set; }
        #endregion

        #region Foreign Keys
        /// <summary>
        /// Gets or sets the item ID.
        /// </summary>
        /// <value>The item ID.</value>
        [ForeignKey("Item")]
        public int ItemID { get; set; }

        /// <summary>
        /// Gets or sets the device ID.
        /// </summary>
        /// <value>The device ID.</value>
        [ForeignKey("Device")]
        public int DeviceID { get; set; }

        /// <summary>
        /// Gets or sets the instance location ID.
        /// </summary>
        /// <value>The instance location ID.</value>
        [ForeignKey("InstanceLocation")]
        public Nullable<int> InstanceLocationID { get; set; }

        /// <summary>
        /// Gets or sets the removed location ID.
        /// </summary>
        /// <value>The removed location ID.</value>
        [ForeignKey("RemovedLocation")]
        public Nullable<int> RemovedLocationID { get; set; }
        #endregion

        #region Attributes
        /// <summary>
        /// Gets or sets the date associated.
        /// </summary>
        /// <value>The date associated.</value>
        public Nullable<System.DateTime> DateAssociated { get; set; }

        /// <summary>
        /// Gets or sets the date removed.
        /// </summary>
        /// <value>The date removed.</value>
        public Nullable<System.DateTime> DateRemoved { get; set; }

        /// <summary>
        /// Gets or sets the is deleted.
        /// </summary>
        /// <value>The is deleted.</value>
        public Nullable<bool> IsDeleted { get; set; }

        /// <summary>
        /// Row ProductVersion Identifier
        /// </summary>
        [Timestamp]
        public virtual byte[] RowVersion
        {
            get;
            set;
        }
        #endregion

        #region Navigation
        /// <summary>
        /// Gets or sets the device.
        /// </summary>
        /// <value>The device.</value>
        public virtual Device Device { get; set; }

        /// <summary>
        /// Gets or sets the item.
        /// </summary>
        /// <value>The item.</value>
        public virtual Item Item { get; set; }

        /// <summary>
        /// Gets or sets the instance location.
        /// </summary>
        /// <value>The instance location.</value>
        public virtual Location InstanceLocation { get; set; }

        /// <summary>
        /// Gets or sets the removed location.
        /// </summary>
        /// <value>The removed location.</value>
        public virtual Location RemovedLocation { get; set; }
        #endregion
    }
}
