//---------------------------------------------------------------------------------------------
// 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>
    /// Manufacturing work orders.
    ///</summary>
    public partial class WorkOrder
    {
        public WorkOrder()
        {
        }

        #region Properties

        public int WorkOrderId  { get; set; }

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

        ///<summary>
        /// Product quantity to build.
        ///</summary>
        public int OrderQty  { get; set; }

        ///<summary>
        /// Quantity built and put in inventory.
        ///</summary>
        public int StockedQty  { get; set; }

        ///<summary>
        /// Quantity that failed inspection.
        ///</summary>
        public short ScrappedQty  { get; set; }

        ///<summary>
        /// Work order start date.
        ///</summary>
        public DateTime StartDate  { get; set; }

        ///<summary>
        /// Work order end date.
        ///</summary>
        public DateTime? EndDate  { get; set; }

        ///<summary>
        /// Work order due date.
        ///</summary>
        public DateTime DueDate  { get; set; }

        ///<summary>
        /// Reason for inspection failure.
        ///</summary>
        public short? ScrapReasonId  { 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>
        /// ScrapReason object referenced by the field ScrapReasonId.
        ///</summary>
        public virtual ScrapReason ScrapReasonObject { get; set; }

        #endregion
    }
}