using System.Collections.Generic;
using System.Globalization;

namespace BO.AppServer.Metadata.Configuration
{
    public class Configuration
    {
        public CfgApis Api { get; set; }
        public CfgSystem System { get; set; }
        public CfgBusiness Business { get; set; }

        public class CfgApis
        {
            public CfgApiConsole Console { get; set; }
        }

        public class CfgApiConsole
        {
            public IList<string> MagicKeys { get; set; }
        }

        public class CfgSystem
        {
            public string DbConnectionBO { get; set; }
            public string DbConnectionIF { get; set; }

            public CfgSystemAccount AccountSystem { get; set; }
            public CfgSystemAccount AccountConsole { get; set; }
            public CfgSystemAccount AccountAdmin { get; set; }
            public CfgSystemAccount AccountProcess { get; set; }
            public string SessionIdleTimeout { get; set; }
            public CfgSystemStorage Storage { get; set; }
            public bool UseSSL { get; set; }

        }

        public class CfgSystemAccount
        {
            public string Name { get; set; }
            public string Password { get; set; }
            public string Email { get; set; }
            public string Culture { get; set; }
            public int CultureLcid => CultureInfo.GetCultureInfo(Culture).LCID;
        }

        public class CfgBusiness
        {
            public string DefaultBillingPlanCode { get; set; }
        }

        public class CfgSystemStorage
        {
            public string InputPath { get; set; }
            public string OutputPath { get; set; }
            public int IoBufferSize { get; set; }
        }
    }

}
