mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
User posts backend.
This commit is contained in:
parent
92f7019269
commit
2dcb12403b
1 changed files with 9 additions and 2 deletions
|
@ -39,7 +39,6 @@ public Role HighestRole
|
|||
}
|
||||
|
||||
public string LastKnownIPAddress { get; set; }
|
||||
|
||||
public DateTime JoinedAt { get; set; }
|
||||
public DateTime LastLogin { get; set; }
|
||||
|
||||
|
@ -91,7 +90,14 @@ public int TopicCount
|
|||
public string Hobbies { get; set; }
|
||||
|
||||
|
||||
|
||||
public UserPost[] Posts
|
||||
{
|
||||
get
|
||||
{
|
||||
var db = new ApplicationDbContext();
|
||||
return db.UserPosts.Where(x => x.UserId == this.Id).ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BannedIP
|
||||
|
@ -118,6 +124,7 @@ public static ApplicationDbContext Create()
|
|||
return new ApplicationDbContext();
|
||||
}
|
||||
|
||||
public DbSet<UserPost> UserPosts { get; set; }
|
||||
public DbSet<ForumPostEdit> ForumPostEdits { get; set; }
|
||||
public DbSet<Like> Likes { get; set; }
|
||||
public DbSet<ForumPermission> ForumPermissions { get; set; }
|
||||
|
|
Loading…
Reference in a new issue