Performance improvements, refactoring of multi-tenant support, split Alias and Tenant entities for cleaner separation of concerns, create an additional site during installation for demonstratng multitenancy
This commit is contained in:
41
Oqtane.Shared/Models/Alias.cs
Normal file
41
Oqtane.Shared/Models/Alias.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
public class Alias
|
||||
{
|
||||
public int AliasId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
public int SiteId { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string Scheme { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string Url
|
||||
{
|
||||
get
|
||||
{
|
||||
return Scheme + "://" + Name;
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Name.Contains("/"))
|
||||
{
|
||||
return Name.Substring(Name.IndexOf("/") + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Oqtane.Models
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
public class Page
|
||||
{
|
||||
|
@ -5,9 +5,8 @@ namespace Oqtane.Models
|
||||
public class Tenant
|
||||
{
|
||||
public int TenantId { get; set; }
|
||||
public string Alias { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string DBConnectionString { get; set; }
|
||||
public string DBSchema { get; set; }
|
||||
public int SiteId { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user