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

import { AddressObject } from 'DataObjects/Person/AddressObjectCustomized';
import { SalesCustomerLookupObject } from 'DataObjects/Sales/SalesCustomerLookupObject';
import { DataObject, TextProperty, IntegerProperty, EnumIntProperty } from 'xomega';

export class SalesOrderCustomerObject extends DataObject {

    // Properties
    public AccountNumber: TextProperty;
    public CustomerId: IntegerProperty;
    public PersonId: IntegerProperty;
    public PersonName: TextProperty;
    public StoreId: IntegerProperty;
    public StoreName: TextProperty;
    public TerritoryId: EnumIntProperty;

    // Child Objects
    public BillingAddressObject: AddressObject;
    public LookupObject: SalesCustomerLookupObject;
    public ShippingAddressObject: AddressObject;

    // Construction and initialization
    init() {
        this.AccountNumber = new TextProperty();
        this.AccountNumber.Required(true);
        this.AccountNumber.Size = 10;
        this.AccountNumber.Editable(false);
        this.CustomerId = new IntegerProperty();
        this.CustomerId.Required(true);
        this.CustomerId.IsKey = true;
        this.PersonId = new IntegerProperty();
        this.PersonId.Editable(false);
        this.PersonName = new TextProperty();
        this.PersonName.Editable(false);
        this.StoreId = new IntegerProperty();
        this.StoreId.Editable(false);
        this.StoreName = new TextProperty();
        this.StoreName.Editable(false);
        this.TerritoryId = new EnumIntProperty();
        this.TerritoryId.EnumType = "sales territory";
        this.TerritoryId.Editable(false);

        // create child objects
        this.LookupObject = new SalesCustomerLookupObject();
        this.BillingAddressObject = new AddressObject();
        this.ShippingAddressObject = new AddressObject();
    }
}
