//---------------------------------------------------------------------------------------------
// 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>
    /// Individual products associated with a specific purchase order. See PurchaseOrderHeader.
    ///</summary>
    public partial class PurchaseOrderDetail
    {
        public PurchaseOrderDetail()
        {
        }

        #region Properties

        ///<summary>
        /// Primary key. Foreign key to PurchaseOrderHeader.PurchaseOrderID.
        ///</summary>
        public int PurchaseOrderId  { get; set; }

        ///<summary>
        /// Primary key. One line number per purchased product.
        ///</summary>
        public int PurchaseOrderDetailId  { get; set; }

        ///<summary>
        /// Date the product is expected to be received.
        ///</summary>
        public DateTime DueDate  { get; set; }

        ///<summary>
        /// Quantity ordered.
        ///</summary>
        public short OrderQty  { get; set; }

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

        ///<summary>
        /// Vendor's selling price of a single product.
        ///</summary>
        public decimal UnitPrice  { get; set; }

        ///<summary>
        /// Per product subtotal. Computed as OrderQty * UnitPrice.
        ///</summary>
        public decimal LineTotal  { get; set; }

        ///<summary>
        /// Quantity actually received from the vendor.
        ///</summary>
        public decimal ReceivedQty  { get; set; }

        ///<summary>
        /// Quantity rejected during inspection.
        ///</summary>
        public decimal RejectedQty  { get; set; }

        ///<summary>
        /// Quantity accepted into inventory. Computed as ReceivedQty - RejectedQty.
        ///</summary>
        public decimal StockedQty  { get; set; }

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

        #endregion

        #region Navigation Properties

        ///<summary>
        /// PurchaseOrderHeader object referenced by the field PurchaseOrderId.
        ///</summary>
        public virtual PurchaseOrderHeader PurchaseOrderObject { get; set; }

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

        #endregion
    }
}