summaryrefslogtreecommitdiff
path: root/Project-Unite/Models
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-24 20:09:42 -0400
committerMichael <[email protected]>2017-03-24 20:09:42 -0400
commit5253e1544bf032d04bc44f4de8d31ddf42dd6a67 (patch)
treea2e542137c1c5730bcdd14aa5fc96db4e0a7b6da /Project-Unite/Models
parent9f42b970ad8488af6c9f302d15be54de719b92c9 (diff)
downloadproject-unite-5253e1544bf032d04bc44f4de8d31ddf42dd6a67.tar.gz
project-unite-5253e1544bf032d04bc44f4de8d31ddf42dd6a67.tar.bz2
project-unite-5253e1544bf032d04bc44f4de8d31ddf42dd6a67.zip
Move ShiftOS save variables to Unite
Diffstat (limited to 'Project-Unite/Models')
-rw-r--r--Project-Unite/Models/IdentityModels.cs45
1 files changed, 44 insertions, 1 deletions
diff --git a/Project-Unite/Models/IdentityModels.cs b/Project-Unite/Models/IdentityModels.cs
index a3dde10..8b1730e 100644
--- a/Project-Unite/Models/IdentityModels.cs
+++ b/Project-Unite/Models/IdentityModels.cs
@@ -45,6 +45,34 @@ namespace Project_Unite.Models
}
}
+ public int StoryPosition { get; set; }
+ public string Language { get; set; }
+ public int MajorVersion { get; set; }
+ public int MinorVersion { get; set; }
+ public int Revision { get; set; }
+
+ public ShiftoriumUpgrade[] Upgrades
+ {
+ get
+ {
+ var db = new ApplicationDbContext();
+ return db.ShiftoriumUpgrades.Where(x => x.UserId == this.Id).ToArray();
+ }
+ }
+
+ public bool IsPatreon { get; set; }
+
+ public int ShiftnetSubscription { get; set; }
+
+ public int LastMonthPaid { get; set; }
+ public Story[] Stories
+ {
+ get
+ {
+ return new ApplicationDbContext().Stories.Where(x => x.UserId == this.Id).ToArray();
+ }
+ }
+
public string LastKnownIPAddress { get; set; }
public DateTime JoinedAt { get; set; }
public DateTime LastLogin { get; set; }
@@ -166,6 +194,7 @@ namespace Project_Unite.Models
return new ApplicationDbContext();
}
+ public DbSet<ShiftoriumUpgrade> ShiftoriumUpgrades { get; set; }
public DbSet<Notification> Notifications { get; set; }
public DbSet<UserFollow> Follows { get; set; }
public DbSet<UserPost> UserPosts { get; set; }
@@ -181,7 +210,7 @@ namespace Project_Unite.Models
public DbSet<ForumPollOption> ForumPollOptions { get; set; }
public DbSet<ForumPollVote> ForumPollVotes { get; set; }
public DbSet<ForumPost> ForumPosts { get; set; }
-
+ public DbSet<Story> Stories { get; set; }
}
public class UserPost
@@ -213,4 +242,18 @@ namespace Project_Unite.Models
}
}
+
+ public class ShiftoriumUpgrade
+ {
+ public string Id { get; set; }
+ public string UserId { get; set; }
+ public string EngineUpgradeId { get; set; }
+ }
+
+ public class Story
+ {
+ public string Id { get; set; }
+ public string UserId { get; set; }
+ public string EngineStoryId { get; set; }
+ }
} \ No newline at end of file