using System;
using System.Collections.Generic;
using AyaNova.Biz;

using System.ComponentModel.DataAnnotations;

using Newtonsoft.Json;

namespace AyaNova.Models
{
    //  [JsonObject(IsReference = true)]
    public partial class Locale
    {
        public long Id { get; set; }
        public uint ConcurrencyToken { get; set; }
       

        [Required]
        public string Name { get; set; }
        public bool? Stock { get; set; }
        public bool CjkIndex { get; set; }


        //Relationship
        //was this but..
        // public ICollection<LocaleItem> LocaleItems { get; set; }

        //Not perhaps so useful here but this is a good way to lazy initialize collections which 
        //is more efficient when there are many child collections (workorder) and means no need to null check the collection
        //https://stackoverflow.com/a/20773057/8939

        private ICollection<LocaleItem> _localeItem;
        public virtual ICollection<LocaleItem> LocaleItems
        {
            get
            {
                return this._localeItem ?? (this._localeItem = new HashSet<LocaleItem>());
            }
        }


    }//eoc

}//eons
