//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using DevExpress.Xpo;
using DevExpress.Data.Filtering;
using System.Collections.Generic;
using System.ComponentModel;
namespace Siegelportal.Module.BusinessObjects.Siegelportal
{

    [Persistent(@"LIEFERSCHEINKOPF")]
    public partial class Lieferscheinkopf : SiegelBase
    {
        int fID;
        [Key(true)]
        public int ID
        {
            get { return fID; }
            set { SetPropertyValue<int>(nameof(ID), ref fID, value); }
        }
        DateTime fLieferdatum;
        [Persistent(@"LIEFERDATUM")]
        public DateTime Lieferdatum
        {
            get { return fLieferdatum; }
            set { SetPropertyValue<DateTime>(nameof(Lieferdatum), ref fLieferdatum, value); }
        }
        string fLiefernr;
        [Indexed(Name = @"Lieferscheinkopf_Liefernr", Unique = true)]
        [Persistent(@"LIEFERNR")]
        public string Liefernr
        {
            get { return fLiefernr; }
            set { SetPropertyValue<string>(nameof(Liefernr), ref fLiefernr, value); }
        }
        Innung fInnungsnr;
        [Persistent(@"INNUNGSNR")]
        [Association(@"LieferscheinkopfReferencesInnung")]
        public Innung Innungsnr
        {
            get { return fInnungsnr; }
            set { SetPropertyValue<Innung>(nameof(Innungsnr), ref fInnungsnr, value); }
        }
        Kunde fKundennr;
        [Persistent(@"KUNDENNR")]
        [Association(@"LieferscheinkopfReferencesKunde")]
        public Kunde Kundennr
        {
            get { return fKundennr; }
            set { SetPropertyValue<Kunde>(nameof(Kundennr), ref fKundennr, value); }
        }
        [Association(@"LieferscheinpositionReferencesLieferscheinkopf"), Aggregated]
        public XPCollection<Lieferscheinposition> Lieferscheinpositions { get { return GetCollection<Lieferscheinposition>(nameof(Lieferscheinpositions)); } }
    }

}
