using System;
using System.Collections.Generic;

namespace Gremlin.GremlinData.EntityClasses
{
    public class Quote
    {
        //primary key:
        public uint QuoteId { get; set; }

        //foreign keys:
        public ICollection<LineItem> LineItems { get; set; }

        //navigation properties:
        //NONE

        //standard properties:
        public DateTime DataCreated { get; set; }
        public DateTime DataModified { get; set; }

        //class properties:
        public string QuotationNumber { get; set; }
        public DateTime QuotationDate { get; set; }
        public DateTime ValidUntil { get; set; }
        public byte ValidFor { get; set; }
        public Contact Recipient { get; set; }
        public Contact SalesRep { get; set; }
        public decimal TotalListprice { get; set; }
        public decimal TotalDiscount { get; set; }
        public decimal TotalNet { get; set; }
        public float VAT { get; set; }
        public decimal TotalGross { get; set; }
        public bool QuoteContains3PP { get; set; }
        public bool QuoteContainsRB { get; set; }
        public string QuoteTemplate { get; set; }

        internal Quote()
        {
            ////Initialize
            //QuotationDate = DateTime.Now;
            ////LineItems = new List<LineItem>();
            //TotalGross = 0;
            //TotalListprice = 0;
            //TotalDiscount = 0;
            //TotalNet = 0;
            //QuoteContains3PP = false;
            //QuoteContainsRB = false;

            // set quote number
            // set validity depending on account classification
            // populate SalesRep data (CurrentUser)
            // populate Addressee data
        }
    }
}
