added support for url mapping and viitors

This commit is contained in:
Shaun Walker
2021-12-09 08:48:56 -05:00
parent de798da074
commit 9c32937c83
45 changed files with 2212 additions and 127 deletions

View File

@ -49,10 +49,20 @@ namespace Oqtane.Models
public int? PwaSplashIconFileId { get; set; }
/// <summary>
/// Determines if users may register / create accounts
/// Determines if visitors may register / create user accounts
/// </summary>
public bool AllowRegistration { get; set; }
/// <summary>
/// Determines if visitors will be tracked
/// </summary>
public bool VisitorTracking { get; set; }
/// <summary>
/// Determines if broken urls (404s) will be captured automatically
/// </summary>
public bool CaptureBrokenUrls { get; set; }
/// <summary>
/// Unique GUID to identify the Site.
/// </summary>

View File

@ -0,0 +1,47 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Oqtane.Models
{
/// <summary>
/// Describes a UrlMapping in Oqtane.
/// </summary>
public class UrlMapping
{
/// <summary>
/// ID of this UrlMapping.
/// </summary>
public int UrlMappingId { get; set; }
/// <summary>
/// Reference to a <see cref="Site"/>
/// </summary>
public int SiteId { get; set; }
/// <summary>
/// A fully quaified Url
/// </summary>
public string Url { get; set; }
/// <summary>
/// A Url the visitor will be redirected to
/// </summary>
public string MappedUrl { get; set; }
/// <summary>
/// Number of requests all time for the url
/// </summary>
public int Requests { get; set; }
/// <summary>
/// Date when the url was first requested for the site
/// </summary>
public DateTime CreatedOn { get; set; }
/// <summary>
/// Date when the url was last requested for the site
/// </summary>
public DateTime RequestedOn { get; set; }
}
}

View File

@ -0,0 +1,61 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Oqtane.Models
{
/// <summary>
/// Describes a Visitor in Oqtane.
/// </summary>
public class Visitor
{
/// <summary>
/// ID of this Visitor.
/// </summary>
public int VisitorId { get; set; }
/// <summary>
/// Reference to a <see cref="Site"/>
/// </summary>
public int SiteId { get; set; }
/// <summary>
/// Reference to a <see cref="User"/> if applicable
/// </summary>
public int? UserId { get; set; }
/// <summary>
/// Number of times a visitor has visited a site
/// </summary>
public int Visits { get; set; }
/// <summary>
/// IP Address of visitor
/// </summary>
public string IPAddress { get; set; }
/// <summary>
/// User agent of visitor
/// </summary>
public string UserAgent { get; set; }
/// <summary>
/// Language of visitor
/// </summary>
public string Language { get; set; }
/// <summary>
/// Date the visitor first visited the site
/// </summary>
public DateTime CreatedOn { get; set; }
/// <summary>
/// Date the visitor last visited the site
/// </summary>
public DateTime VisitedOn { get; set; }
/// <summary>
/// Direct reference to the <see cref="User"/> object (if applicable)
/// </summary>
public User User { get; set; }
}
}

View File

@ -3,8 +3,8 @@ using System;
namespace Oqtane.Shared {
public class Constants {
public static readonly string Version = "3.0.0";
public const string ReleaseVersions = "1.0.0,1.0.1,1.0.2,1.0.3,1.0.4,2.0.0,2.0.1,2.0.2,2.1.0,2.2.0,2.3.0,2.3.1,3.0.0";
public static readonly string Version = "3.0.1";
public const string ReleaseVersions = "1.0.0,1.0.1,1.0.2,1.0.3,1.0.4,2.0.0,2.0.1,2.0.2,2.1.0,2.2.0,2.3.0,2.3.1,3.0.0,3.0.1";
public const string PackageId = "Oqtane.Framework";
public const string UpdaterPackageId = "Oqtane.Updater";
public const string PackageRegistryUrl = "https://www.oqtane.net";

View File

@ -1,4 +1,4 @@
namespace Oqtane.Shared
namespace Oqtane.Shared
{
public class EntityNames
{
@ -10,5 +10,6 @@
public const string Page = "Page";
public const string Folder = "Folder";
public const string User = "User";
public const string Visitor = "Visitor";
}
}