//---------------------------------------------------------------------------------------------
// This file was AUTO-GENERATED by "EF Domain Objects" Xomega.Net generator.
//
// Manual CHANGES to this file WILL BE LOST when the code is regenerated.
//---------------------------------------------------------------------------------------------

using System;

namespace AdventureWorks.Services.Entities
{
    ///<summary>
    /// Cross-reference table mapping vendors with the products they supply.
    ///</summary>
    public partial class ProductVendor
    {
        public ProductVendor()
        {
        }

        #region Properties

        ///<summary>
        /// Primary key. Foreign key to Product.ProductID.
        ///</summary>
        public int ProductId  { get; set; }

        ///<summary>
        /// Primary key. Foreign key to Vendor.BusinessEntityID.
        ///</summary>
        public int BusinessEntityId  { get; set; }

        ///<summary>
        /// The average span of time (in days) between placing an order with the vendor and receiving the purchased product.
        ///</summary>
        public int AverageLeadTime  { get; set; }

        ///<summary>
        /// The vendor's usual selling price.
        ///</summary>
        public decimal StandardPrice  { get; set; }

        ///<summary>
        /// The selling price when last purchased.
        ///</summary>
        public decimal? LastReceiptCost  { get; set; }

        ///<summary>
        /// Date the product was last received by the vendor.
        ///</summary>
        public DateTime? LastReceiptDate  { get; set; }

        ///<summary>
        /// The maximum quantity that should be ordered.
        ///</summary>
        public int MinOrderQty  { get; set; }

        ///<summary>
        /// The minimum quantity that should be ordered.
        ///</summary>
        public int MaxOrderQty  { get; set; }

        ///<summary>
        /// The quantity currently on order.
        ///</summary>
        public int? OnOrderQty  { get; set; }

        ///<summary>
        /// The product's unit of measure.
        ///</summary>
        public string UnitMeasureCode  { get; set; }

        ///<summary>
        /// Date and time the record was last updated.
        ///</summary>
        public DateTime ModifiedDate  { get; set; }

        #endregion

        #region Navigation Properties

        ///<summary>
        /// Product object referenced by the field ProductId.
        ///</summary>
        public virtual Product ProductObject { get; set; }

        ///<summary>
        /// Vendor object referenced by the field BusinessEntityId.
        ///</summary>
        public virtual Vendor BusinessEntityObject { get; set; }

        ///<summary>
        /// UnitMeasure object referenced by the field UnitMeasureCode.
        ///</summary>
        public virtual UnitMeasure UnitMeasureCodeObject { get; set; }

        #endregion
    }
}