diff options
Diffstat (limited to 'Project-Unite/Models')
| -rw-r--r-- | Project-Unite/Models/Group.cs | 28 | ||||
| -rw-r--r-- | Project-Unite/Models/IdentityModels.cs | 3 |
2 files changed, 31 insertions, 0 deletions
diff --git a/Project-Unite/Models/Group.cs b/Project-Unite/Models/Group.cs new file mode 100644 index 0000000..f59270b --- /dev/null +++ b/Project-Unite/Models/Group.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace Project_Unite.Models +{ + public class Group + { + public string Id { get; set; } + public string Name { get; set; } + public int Publicity { get; set; } + public string BannerColorHex { get; set; } + public string Description { get; set; } + public string ShortName { get; set; } + + public double RawReputation { get; set; } + + public int Reputation + { + get + { + return ((int)Math.Round(RawReputation)); + } + } + + } +}
\ No newline at end of file diff --git a/Project-Unite/Models/IdentityModels.cs b/Project-Unite/Models/IdentityModels.cs index 2e1bf31..46c8e56 100644 --- a/Project-Unite/Models/IdentityModels.cs +++ b/Project-Unite/Models/IdentityModels.cs @@ -30,6 +30,8 @@ namespace Project_Unite.Models // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more. public class ApplicationUser : IdentityUser { + public string GroupId { get; set; } + public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager) { // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType @@ -252,6 +254,7 @@ namespace Project_Unite.Models public DbSet<Story> Stories { get; set; } public DbSet<View> Views { get; set; } public DbSet<OAuthToken> OAuthTokens { get; set; } + public DbSet<Group> Groups { get; set; } } public class OAuthToken |
