Moved to fluent. Added support for Modifiers. Fixtures to load intial test data
This commit is contained in:
20
Tanshu.Accounts.Contracts/Data Contracts/Auth/Group.cs
Normal file
20
Tanshu.Accounts.Contracts/Data Contracts/Auth/Group.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using FluentNHibernate.Mapping;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Tanshu.Accounts.Entities.Auth
|
||||
{
|
||||
public class Group
|
||||
{
|
||||
public virtual int GroupID { get; set; }
|
||||
public virtual string Name { get; set; }
|
||||
public virtual IList<RoleGroup> RoleGroups { get; set; }
|
||||
public virtual IList<UserGroup> UserGroups { get; set; }
|
||||
public Group()
|
||||
{
|
||||
RoleGroups = new List<RoleGroup>();
|
||||
UserGroups = new List<UserGroup>();
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Tanshu.Accounts.Contracts/Data Contracts/Auth/Role.cs
Normal file
19
Tanshu.Accounts.Contracts/Data Contracts/Auth/Role.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using FluentNHibernate.Mapping;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Tanshu.Accounts.Entities.Auth
|
||||
{
|
||||
public class Role
|
||||
{
|
||||
public virtual int RoleID { get; set; }
|
||||
public virtual string Name { get; set; }
|
||||
public virtual IList<RoleGroup> Groups { get; set; }
|
||||
|
||||
public Role()
|
||||
{
|
||||
Groups = new List<RoleGroup>();
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Tanshu.Accounts.Contracts/Data Contracts/Auth/RoleGroup.cs
Normal file
13
Tanshu.Accounts.Contracts/Data Contracts/Auth/RoleGroup.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using FluentNHibernate.Mapping;
|
||||
|
||||
namespace Tanshu.Accounts.Entities.Auth
|
||||
{
|
||||
public class RoleGroup
|
||||
{
|
||||
public virtual int RoleGroupID { get; set; }
|
||||
public virtual Role Role { get; set; }
|
||||
public virtual Group Group { get; set; }
|
||||
}
|
||||
}
|
||||
20
Tanshu.Accounts.Contracts/Data Contracts/Auth/UserBO.cs
Normal file
20
Tanshu.Accounts.Contracts/Data Contracts/Auth/UserBO.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using FluentNHibernate.Mapping;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Tanshu.Accounts.Entities.Auth
|
||||
{
|
||||
public class User
|
||||
{
|
||||
public virtual int UserID { get; set; }
|
||||
public virtual string Name { get; set; }
|
||||
public virtual string Password { get; set; }
|
||||
public virtual bool LockedOut { get; set; }
|
||||
public virtual IList<Group> Groups { get; set; }
|
||||
public User()
|
||||
{
|
||||
Groups = new List<Group>();
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Tanshu.Accounts.Contracts/Data Contracts/Auth/UserGroup.cs
Normal file
13
Tanshu.Accounts.Contracts/Data Contracts/Auth/UserGroup.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using FluentNHibernate.Mapping;
|
||||
|
||||
namespace Tanshu.Accounts.Entities.Auth
|
||||
{
|
||||
public class UserGroup
|
||||
{
|
||||
public virtual int UserGroupID { get; set; }
|
||||
public virtual User User { get; set; }
|
||||
public virtual Group Group { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user