using System;
using System.Collections.Generic;

namespace Baza_Reklam.Classes.Model
{
    public class Subscription
    {
        private readonly int _id;
        private Guid _guid;
        private int _customerId;
        //private int _titleId;
        private int _subscriptionTypeId;
        private int _subscriptionItems;
        private decimal _basePrice;
        private decimal _totalPrice;
        private decimal _discount;
        private decimal _vat;
        private string _currency;
        private DateTime _startDate;
        private int _orderId;
        private DateTime _createdOn;
        private int _createdBy;
        private DateTime _updatedOn;
        private int _updatedBy;

        private int _invoiceId;

        //private readonly SubscriptionType _subscriptionType;
        //private readonly Customer _customer;
        //private readonly Agent _agent;
        private List<SubscriptionDetail> _subscriptionDetails;

        public Subscription() { }

        public Subscription(int id)
        {
            _id = id;
        }

        public int Id
        {
            get { return _id; }
            //set { _id = value; }
        }

        public Guid Guid
        {
            get { return _guid; }
            set { _guid = value; }
        }

        public int CustomerId
        {
            get { return _customerId; }
            set { _customerId = value; }
        }

        public int SubscriptionTypeId
        {
            get { return _subscriptionTypeId; }
            set { _subscriptionTypeId = value; }
        }

        public decimal BasePrice
        {
            get { return _basePrice; }
            set { _basePrice = value; }
        }

        public decimal TotalPrice
        {
            get { return _totalPrice; }
            set { _totalPrice = value; }
        }

        public decimal Discount
        {
            get { return _discount; }
            set { _discount = value; }
        }

        public decimal Vat
        {
            get { return _vat; }
            set { _vat = value; }
        }

        public string Currency
        {
            get { return _currency; }
            set { _currency = value; }
        }

        public int OrderId
        {
            get { return _orderId; }
            set { _orderId = value; }
        }

        public DateTime CreatedOn
        {
            get { return _createdOn; }
            set { _createdOn = value; }
        }

        public int CreatedBy
        {
            get { return _createdBy; }
            set { _createdBy = value; }
        }

        public DateTime UpdatedOn
        {
            get { return _updatedOn; }
            set { _updatedOn = value; }
        }

        public int UpdatedBy
        {
            get { return _updatedBy; }
            set { _updatedBy = value; }
        }
/*
        public SubscriptionType SubscriptionType
        {
            get { return _subscriptionType; }
        }

        public Customer Customer
        {
            get { return _customer; }
        }

        public Agent Agent
        {
            get { return _agent; }
        }
*/
        public DateTime StartDate
        {
            get { return _startDate; }
            set { _startDate = value; }
        }

        public int SubscriptionItems
        {
            get { return _subscriptionItems; }
            set { _subscriptionItems = value; }
        }

        public int InvoiceId
        {
            get { return _invoiceId; }
            set { _invoiceId = value; }
        }

        public List<SubscriptionDetail> SubscriptionDetails
        {
            get { return _subscriptionDetails; }
        }

        public void AddSubscriptionDetail(SubscriptionDetail subscriptionDetail)
        {
            if (_subscriptionDetails == null)
                _subscriptionDetails = new List<SubscriptionDetail>();

            _subscriptionDetails.Add(subscriptionDetail);
        }
    }
}