using zero.Core.Plugins;
namespace zero.Core
{
public class ZeroOptions : IZeroOptions
{
public ZeroOptions()
{
SupportedLanguages = new string[2] { "en-US", "de-DE" };
DefaultLanguage = SupportedLanguages[0];
TokenExpiration = 60;
BackofficePath = "/zero";
}
///
public string ZeroVersion { get; set; }
///
public string DefaultLanguage { get; set; }
///
public string[] SupportedLanguages { get; private set; }
///
public int TokenExpiration { get; set; }
///
public RavenOptions Raven { get; set; }
///
public string BackofficePath { get; set; }
///
public ZeroPlugin Backoffice { get; set; }
}
public class RavenOptions
{
public string Url { get; set; }
public string Database { get; set; }
}
public interface IZeroOptions
{
///
/// The currently active version
/// This should not be set manually, as it is used for setup and migrations and incremented automatically
///
string ZeroVersion { get; set; }
///
/// Default language ISO code
///
string DefaultLanguage { get; set; }
///
/// Language ISO codes which are supported by the zero backoffice
///
string[] SupportedLanguages { get; }
///
/// Expiration in minutes of a generated change token for an entity
///
int TokenExpiration { get; set; }
///
/// RavenDB configuration data
///
RavenOptions Raven { get; set; }
///
/// URL path to the backoffice (defaults to /zero)
///
string BackofficePath { get; set; }
///
/// Default settings for the backoffice
///
ZeroPlugin Backoffice { get; set; }
}
}