diff options
| author | Michael <[email protected]> | 2017-05-07 09:19:55 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-07 09:19:55 -0400 |
| commit | 0ae47a126b1fb37ecbc80ecddd34a892fb6fd3b2 (patch) | |
| tree | 1daa7ef50bdc8fd340566b8731eb5d9805cc2fa4 /Project-Unite/Models | |
| parent | 0cdba811a67c0fa8f9a68c8efa9280ea0cf22801 (diff) | |
| download | project-unite-0ae47a126b1fb37ecbc80ecddd34a892fb6fd3b2.tar.gz project-unite-0ae47a126b1fb37ecbc80ecddd34a892fb6fd3b2.tar.bz2 project-unite-0ae47a126b1fb37ecbc80ecddd34a892fb6fd3b2.zip | |
groups (formerly legions) index
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 |
