summaryrefslogtreecommitdiff
path: root/Project-Unite/Models
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-25 15:59:50 -0400
committerMichael <[email protected]>2017-03-25 15:59:50 -0400
commit9f238cc47fd5b9ec546b37986371e73d6ed3c626 (patch)
treee1d9175d58999ca99d5308c2b42749bab5806581 /Project-Unite/Models
parent84285d2ffb84f470ab7b09708075427ae31541f0 (diff)
downloadproject-unite-9f238cc47fd5b9ec546b37986371e73d6ed3c626.tar.gz
project-unite-9f238cc47fd5b9ec546b37986371e73d6ed3c626.tar.bz2
project-unite-9f238cc47fd5b9ec546b37986371e73d6ed3c626.zip
Avatar system :smiley:
Diffstat (limited to 'Project-Unite/Models')
-rw-r--r--Project-Unite/Models/IdentityModels.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/Project-Unite/Models/IdentityModels.cs b/Project-Unite/Models/IdentityModels.cs
index cb4a712..c08e4c7 100644
--- a/Project-Unite/Models/IdentityModels.cs
+++ b/Project-Unite/Models/IdentityModels.cs
@@ -6,6 +6,7 @@ using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
+using System.Web;
using System.Web.Mvc;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
@@ -19,6 +20,12 @@ namespace Project_Unite.Models
public string Followed { get; set; }
}
+ public class UploadImageViewModel
+ {
+ [Required(ErrorMessage = "Please select an image to upload.")]
+ public HttpPostedFileBase Image { get; set; }
+ }
+
// 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
{
@@ -189,11 +196,14 @@ namespace Project_Unite.Models
((IObjectContextAdapter)this).ObjectContext.DeleteObject(obj);
}
+
+
public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
}
+ public DbSet<Avatar> UserAvatars { get; set; }
public DbSet<Skin> Skins { get; set; }
public DbSet<Configuration> Configs { get; set; }
public DbSet<ShiftoriumUpgrade> ShiftoriumUpgrades { get; set; }
@@ -259,4 +269,12 @@ namespace Project_Unite.Models
public string UserId { get; set; }
public string EngineStoryId { get; set; }
}
+
+ public class Avatar
+ {
+ public string Id { get; set; }
+ public string UserId { get; set; }
+ public string AvatarUrl { get; set; }
+ public DateTime UploadedAt { get; set; }
+ }
} \ No newline at end of file