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

using Microsoft.Extensions.DependencyInjection;
using System;
using Xomega.Framework;
using Xomega.Framework.Properties;

namespace AdventureWorks.Client.Objects
{
    public partial class SalesOrderPaymentObject : DataObject
    {
        #region Constants

        public const string CreditCard = "CreditCard";
        public const string CurrencyRate = "CurrencyRate";
        public const string DueDate = "DueDate";
        public const string Freight = "Freight";
        public const string ShipMethodId = "ShipMethodId";
        public const string SubTotal = "SubTotal";
        public const string TaxAmt = "TaxAmt";
        public const string TotalDue = "TotalDue";

        #endregion

        #region Properties

        public TextProperty CurrencyRateProperty { get; private set; }
        public DateProperty DueDateProperty { get; private set; }
        public MoneyProperty FreightProperty { get; private set; }
        public EnumIntProperty ShipMethodIdProperty { get; private set; }
        public MoneyProperty SubTotalProperty { get; private set; }
        public MoneyProperty TaxAmtProperty { get; private set; }
        public MoneyProperty TotalDueProperty { get; private set; }

        #endregion

        #region Child Objects

        public CreditCardPaymentObject CreditCardObject { get { return (CreditCardPaymentObject)GetChildObject(CreditCard); } }

        #endregion

        #region Construction

        public SalesOrderPaymentObject()
        {
        }

        public SalesOrderPaymentObject(IServiceProvider serviceProvider) : base(serviceProvider)
        {
        }

        protected override void Initialize()
        {
            SubTotalProperty = new MoneyProperty(this, SubTotal)
            {
                Required = true,
                Editable = false,
            };
            ShipMethodIdProperty = new EnumIntProperty(this, ShipMethodId)
            {
                Required = true,
                EnumType = "ship method",
            };
            TaxAmtProperty = new MoneyProperty(this, TaxAmt)
            {
                Required = true,
                Editable = false,
            };
            FreightProperty = new MoneyProperty(this, Freight)
            {
                Required = true,
                Editable = false,
            };
            TotalDueProperty = new MoneyProperty(this, TotalDue)
            {
                Required = true,
                Editable = false,
            };
            DueDateProperty = new DateProperty(this, DueDate)
            {
                Required = true,
            };
            CurrencyRateProperty = new TextProperty(this, CurrencyRate)
            {
                Editable = false,
            };
            DataObject objCreditCard = ServiceProvider.GetService<CreditCardPaymentObject>();
            AddChildObject(CreditCard, objCreditCard);
        }

        #endregion
    }
}