mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-03-13 19:40:24 +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 @@ namespace Project_Unite.Models
|
||||||
}
|
}
|
||||||
|
|
||||||
public string LastKnownIPAddress { get; set; }
|
public string LastKnownIPAddress { get; set; }
|
||||||
|
|
||||||
public DateTime JoinedAt { get; set; }
|
public DateTime JoinedAt { get; set; }
|
||||||
public DateTime LastLogin { get; set; }
|
public DateTime LastLogin { get; set; }
|
||||||
|
|
||||||
|
@ -91,7 +90,14 @@ namespace Project_Unite.Models
|
||||||
public string Hobbies { get; set; }
|
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
|
public class BannedIP
|
||||||
|
@ -118,6 +124,7 @@ namespace Project_Unite.Models
|
||||||
return new ApplicationDbContext();
|
return new ApplicationDbContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DbSet<UserPost> UserPosts { get; set; }
|
||||||
public DbSet<ForumPostEdit> ForumPostEdits { get; set; }
|
public DbSet<ForumPostEdit> ForumPostEdits { get; set; }
|
||||||
public DbSet<Like> Likes { get; set; }
|
public DbSet<Like> Likes { get; set; }
|
||||||
public DbSet<ForumPermission> ForumPermissions { get; set; }
|
public DbSet<ForumPermission> ForumPermissions { get; set; }
|
||||||
|
|
Loading…
Add table
Reference in a new issue