-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
514 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/_Authorization/Framework.Authorization.Domain/PermissionRestriction.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...uthorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/Base/AuthBaseMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using FluentNHibernate.Mapping; | ||
|
||
using Framework.Authorization.Domain; | ||
|
||
namespace Framework.Authorization.Generated.DAL.NHibernate.Mapping.Base; | ||
|
||
public abstract class AuthBaseMap<TEntity> : ClassMap<TEntity> | ||
where TEntity : AuditPersistentDomainObjectBase | ||
{ | ||
protected AuthBaseMap() | ||
{ | ||
this.Schema("auth"); | ||
|
||
this.DynamicUpdate(); | ||
|
||
this.Id(x => x.Id).GeneratedBy.GuidComb(); | ||
|
||
this.Map(x => x.CreatedBy); | ||
this.Map(x => x.CreateDate); | ||
this.Map(x => x.ModifiedBy); | ||
this.Map(x => x.ModifyDate); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/BusinessRoleMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Framework.Authorization.Domain; | ||
using Framework.Authorization.Generated.DAL.NHibernate.Mapping.Base; | ||
|
||
namespace Framework.Authorization.Generated.DAL.NHibernate.Mapping; | ||
|
||
public class BusinessRoleMap : AuthBaseMap<BusinessRole> | ||
{ | ||
public BusinessRoleMap() | ||
{ | ||
this.Map(x => x.Name).Unique().Not.Nullable(); | ||
this.Map(x => x.Description); | ||
this.HasMany(x => x.Permissions).AsSet().Inverse().Cascade.None(); | ||
} | ||
} |
80 changes: 0 additions & 80 deletions
80
...ization.Generated.DAL.NHibernate/Mapping/Generated.Framework.Authorization.Domain.hbm.xml
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PermissionMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Framework.Authorization.Domain; | ||
using Framework.Authorization.Generated.DAL.NHibernate.Mapping.Base; | ||
|
||
namespace Framework.Authorization.Generated.DAL.NHibernate.Mapping; | ||
|
||
public class PermissionMap : AuthBaseMap<Permission> | ||
{ | ||
public PermissionMap() | ||
{ | ||
this.Map(x => x.Comment).Length(int.MaxValue); | ||
this.References(x => x.DelegatedFrom).Column($"{nameof(Permission.DelegatedFrom)}Id"); | ||
this.References(x => x.Principal).Column($"{nameof(Permission.Principal)}Id").Not.Nullable(); | ||
this.References(x => x.Role).Column($"{nameof(Permission.Role)}Id").Not.Nullable(); | ||
this.Component( | ||
x => x.Period, | ||
part => | ||
{ | ||
part.Map(x => x.EndDate).Column("periodendDate"); | ||
part.Map(x => x.StartDate).Column("periodstartDate"); | ||
}); | ||
|
||
this.HasMany(x => x.DelegatedTo).AsSet().Inverse().Cascade.AllDeleteOrphan(); | ||
this.HasMany(x => x.Restrictions).AsSet().Inverse().Cascade.AllDeleteOrphan(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...tion/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PermissionRestrictionMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Framework.Authorization.Domain; | ||
using Framework.Authorization.Generated.DAL.NHibernate.Mapping.Base; | ||
|
||
namespace Framework.Authorization.Generated.DAL.NHibernate.Mapping; | ||
|
||
public class PermissionRestrictionMap : AuthBaseMap<PermissionRestriction> | ||
{ | ||
public PermissionRestrictionMap() | ||
{ | ||
this.Map(x => x.SecurityContextId).Not.Nullable() | ||
.UniqueKey("UIX_permission_securityContextId_securityContextTypePermissionRestriction"); | ||
this.References(x => x.Permission).Column($"{nameof(PermissionRestriction.Permission)}Id").Not.Nullable() | ||
.UniqueKey("UIX_permission_securityContextId_securityContextTypePermissionRestriction"); | ||
this.References(x => x.SecurityContextType).Column($"{nameof(PermissionRestriction.SecurityContextType)}Id").Not.Nullable() | ||
.UniqueKey("UIX_permission_securityContextId_securityContextTypePermissionRestriction"); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/_Authorization/Framework.Authorization.Generated.DAL.NHibernate/Mapping/PrincipalMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Framework.Authorization.Domain; | ||
using Framework.Authorization.Generated.DAL.NHibernate.Mapping.Base; | ||
|
||
namespace Framework.Authorization.Generated.DAL.NHibernate.Mapping; | ||
|
||
public class PrincipalMap : AuthBaseMap<Principal> | ||
{ | ||
public PrincipalMap() | ||
{ | ||
this.Map(x => x.Name).Not.Nullable().UniqueKey("UIX_namePrincipal"); | ||
this.References(x => x.RunAs).Column($"{nameof(Principal.RunAs)}Id"); | ||
this.HasMany(x => x.Permissions).AsSet().Inverse().Cascade.AllDeleteOrphan(); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...zation/Framework.Authorization.Generated.DAL.NHibernate/Mapping/SecurityContextTypeMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Framework.Authorization.Domain; | ||
using Framework.Authorization.Generated.DAL.NHibernate.Mapping.Base; | ||
|
||
namespace Framework.Authorization.Generated.DAL.NHibernate.Mapping; | ||
|
||
public class SecurityContextTypeMap : AuthBaseMap<SecurityContextType> | ||
{ | ||
public SecurityContextTypeMap() => this.Map(x => x.Name).Not.Nullable(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.