using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HeterogenousData
{
    public class Item : BaseItem
    {
        private String _name = "";
        private String _description = "";
        private String _creatorCollectionId;


        public Item()
            : base()
        {
            _creatorCollectionId = "Jan"; //later, get userCollectionId from Session
        }

        public Item(String itemId, String collectionId, DateTime creationDate, String name, String description, String creatorCollectionId)
            : base(itemId, collectionId, creationDate)
        {
            _name = name;
            _description = description;
            _creatorCollectionId = creatorCollectionId;
        }

        public string Name
        {
            get
            {
                return _name;
            }

            set
            {
                SetProperty(ref _name, value);
            }
        }

        public string Description
        {
            get
            {
                return _description;
            }

            set
            {
                SetProperty(ref _description, value);
            }
        }

        private void SetProperty(ref string _description, string value)
        {
            if (_description != value)
            {
                _description = value;
            }
            //throw new NotImplementedException();
        }

        public string CreatorCollectionId
        {
            get
            {
                return _creatorCollectionId;
            }

            set
            {
                SetProperty(ref _creatorCollectionId, value);
            }
        }
    }
}
