using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Sockeye.Biz;

namespace Sockeye.Models
{
    public class Product : ICoreBizObjectModel
    {
        public long Id { get; set; }
        public uint Concurrency { get; set; }

        [Required]
        public string Name { get; set; }
        public bool Active { get; set; }
        [Required]
        public ProductGroup PGroup {get;set;}
        public long VendorId { get; set; }
        public TimeSpan LicenseInterval { get; set; }
        public TimeSpan MaintInterval { get; set; }
        public string VendorCode { get; set; }
        public string OurCode { get; set; }
        public string Wiki { get; set; }
        public List<string> Tags { get; set; }

        public Product()
        {
            Tags = new List<string>();
        }

        [NotMapped, JsonIgnore]
        public SockType SType { get => SockType.Product; }
    }//eoc
}//eons
