using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace Oqtane.Models
{
///
/// Describes a Site in a in an Oqtane installation.
/// Sites can have multiple es.
///
public class Site : IAuditable, IDeletable
{
///
/// Internal ID, not to be confused with the
///
public int SiteId { get; set; }
///
/// Reference to the the Site is in
///
public int TenantId { get; set; }
///
/// The site Name
/// TODO: todoc where this will be used / shown
///
public string Name { get; set; }
///
/// Reference to a which has the Logo for this site.
/// Should be an image.
/// The theme can then use this where needed.
///
public int? LogoFileId { get; set; }
///
/// Reference to a which has the FavIcon for this site.
/// Should be an image.
/// The theme can then use this where needed.
/// TODO: todoc does this get applied automatically, or does the Theme do this?
///
public int? FaviconFileId { get; set; }
public string DefaultThemeType { get; set; }
public string DefaultContainerType { get; set; }
public string AdminContainerType { get; set; }
public bool PwaIsEnabled { get; set; }
public int? PwaAppIconFileId { get; set; }
public int? PwaSplashIconFileId { get; set; }
///
/// Determines if visitors may register / create user accounts
///
public bool AllowRegistration { get; set; }
///
/// Determines if visitors will be tracked
///
public bool VisitorTracking { get; set; }
///
/// Determines if broken urls (404s) will be captured automatically
///
public bool CaptureBrokenUrls { get; set; }
///
/// Unique GUID to identify the Site.
///
public string SiteGuid { get; set; }
///
/// The hosting model for the site (ie. Server or WebAssembly ).
///
public string Runtime { get; set; }
///
/// The render mode for the site (ie. Server, ServerPrerendered, WebAssembly, WebAssemblyPrerendered ).
///
public string RenderMode { get; set; }
///
/// Keeps track of site configuration changes and is used by the IUpgradeable interface
///
public string Version { get; set; }
///
/// The home page of the site which will be used as a fallback if no page has a path of "/"
///
public int? HomePageId { get; set; }
[NotMapped]
public Dictionary Settings { get; set; }
[NotMapped]
public List Pages { get; set; }
[NotMapped]
public List Modules { get; set; }
[NotMapped]
public List Languages { get; set; }
#region IAuditable Properties
///
public string CreatedBy { get; set; }
///
public DateTime CreatedOn { get; set; }
///
public string ModifiedBy { get; set; }
///
public DateTime ModifiedOn { get; set; }
#endregion
#region Extended IAuditable Properties, may be moved to an Interface some day so not documented yet
public string DeletedBy { get; set; }
public DateTime? DeletedOn { get; set; }
public bool IsDeleted { get; set; }
#endregion
[NotMapped]
public string SiteTemplateType { get; set; }
#region Obsolete properties
[NotMapped]
[Obsolete("This property is deprecated.", false)]
public string DefaultLayoutType { get; set; }
#endregion
}
}