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 : ModelBase, 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; } /// /// Indicates if a site can be integrated with an external .NET MAUI hybrid application /// public bool HybridEnabled { get; set; } /// /// Keeps track of site configuration changes and is used by the ISiteMigration 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; } /// /// Content to be included in the head of the page /// public string HeadContent { get; set; } /// /// Content to be included in the body of the page /// public string BodyContent { get; set; } /// /// The ImageFile extensions /// [NotMapped] public string ImageFiles { get; set; } /// /// The UploadableFile extensions /// [NotMapped] public string UploadableFiles { 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; } [NotMapped] public List Themes { get; set; } #region IDeletable Properties 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 } }