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 SubscriptionServer : ICoreBizObjectModel
    {
        public long Id { get; set; }
        public uint Concurrency { get; set; }

        [Required]
        public string Name { get; set; }
        public string IPAddress { get; set; }
        [Required]
        public ServerState ServerState { get; set; } = ServerState.Requested;
        public string Notes { get; set; }
        public DateTime Created { get; set; }
        [Required]
        public string DataCenter { get; set; }
        [Required]
        public string TimeZone { get; set; }
        public string DbId { get; set; }
        public DateTime? LastUpdated { get; set; }
        public DateTime SubscriptionExpire { get; set; }
        public decimal Cost { get; set; }
        public string LastHealthStatus { get; set; }
        public DateTime? LastHealthCheck { get; set; }
        public bool Trial { get; set; }
        public string TrialContact { get; set; }
        public string TrialEmail { get; set; }
        public string TrialCompany { get; set; }
        public string OperatingSystem { get; set; }
        public string CustomerSubDomain { get; set; }
        public long? CustomerId { get; set; }
        public string Wiki { get; set; }
        public List<string> Tags { get; set; }



        public SubscriptionServer()
        {
            Tags = new List<string>();
            Created = DateTime.UtcNow;
        }

        [NotMapped, JsonIgnore]
        public SockType SType { get => SockType.SubscriptionServer; }

    }//eoc

}//eons
