using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Com.FirmLib.CacheData;

namespace Com.FirmLib
{
    public class ProjectSetting
    {
        [Obsolete]
        private const string  DefaultSecret= "saga123456";
        public ProjectSetting()
        {
           // Secret = DefaultSecret;
        }
        public ProjectSetting(string projectId):this()
        {
            ProjectId = projectId;
        }
        /// <summary>
        /// 项目信息
        /// </summary>
        public string ProjectId { get; set; }

        private string m_Secret;
        /// <summary>
        /// 项目验证信息
        /// </summary>
        public string Secret
        {
            private set { m_Secret = value; }
            get
            {
                if (!string.IsNullOrEmpty(m_Secret))
                {
                    return m_Secret;
                }

                return PlatformProjectManager.GetProjectPassword(ProjectId);
            }
        }
    }
}
