diff --git a/csharp/App/Backend/Database/Create.cs b/csharp/App/Backend/Database/Create.cs index 4eb630a82..537192476 100644 --- a/csharp/App/Backend/Database/Create.cs +++ b/csharp/App/Backend/Database/Create.cs @@ -34,13 +34,13 @@ public static partial class Db return Connection.Insert(session) > 0; } - public static Boolean Create(User2Installation user2Installation) + public static Boolean Create(InstallationAccess installationAccess) { - return Connection.Insert(user2Installation) > 0; + return Connection.Insert(installationAccess) > 0; } - public static Boolean Create(User2Folder user2Folder) + public static Boolean Create(FolderAccess folderAccess) { - return Connection.Insert(user2Folder) > 0; + return Connection.Insert(folderAccess) > 0; } } \ No newline at end of file diff --git a/csharp/App/Backend/Database/Db.cs b/csharp/App/Backend/Database/Db.cs index 07bae933f..c543967e9 100644 --- a/csharp/App/Backend/Database/Db.cs +++ b/csharp/App/Backend/Database/Db.cs @@ -19,8 +19,8 @@ public static partial class Db public static TableQuery Folders => Connection.Table(); public static TableQuery Installations => Connection.Table(); public static TableQuery Users => Connection.Table(); - public static TableQuery User2Folder => Connection.Table(); - public static TableQuery User2Installation => Connection.Table(); + public static TableQuery User2Folder => Connection.Table(); + public static TableQuery User2Installation => Connection.Table(); static Db() @@ -32,8 +32,8 @@ public static partial class Db Connection.CreateTable(); Connection.CreateTable(); Connection.CreateTable(); - Connection.CreateTable(); - Connection.CreateTable(); + Connection.CreateTable(); + Connection.CreateTable(); Connection.CreateTable(); }); diff --git a/csharp/App/Backend/Database/Fake.cs b/csharp/App/Backend/Database/Fake.cs index ab144c11d..ce00e87a4 100644 --- a/csharp/App/Backend/Database/Fake.cs +++ b/csharp/App/Backend/Database/Fake.cs @@ -70,7 +70,7 @@ public static partial class Db foreach (var user in Users) while (Random.Shared.Next((Int32)(nUsers - user.Id + 1)) != 0) { - var relation = new User2Folder + var relation = new FolderAccess { UserId = user.Id, FolderId = Random.Shared.Next(nFolders) + 1 @@ -89,7 +89,7 @@ public static partial class Db foreach (var user in Users) while (Random.Shared.Next(5) != 0) { - var relation = new User2Installation + var relation = new InstallationAccess { UserId = user.Id, InstallationId = Random.Shared.Next(nbInstallations) + 1 diff --git a/csharp/App/Backend/Relations/User2Folder.cs b/csharp/App/Backend/Relations/FolderAccess.cs similarity index 80% rename from csharp/App/Backend/Relations/User2Folder.cs rename to csharp/App/Backend/Relations/FolderAccess.cs index 0cd1fa191..545647a46 100644 --- a/csharp/App/Backend/Relations/User2Folder.cs +++ b/csharp/App/Backend/Relations/FolderAccess.cs @@ -2,7 +2,7 @@ using SQLite; namespace InnovEnergy.App.Backend.Relations; -public class User2Folder : Relation +public class FolderAccess : Relation { [Indexed] public Int64 UserId { get => Left ; init => Left = value;} [Indexed] public Int64 FolderId { get => Right; init => Right = value;} diff --git a/csharp/App/Backend/Relations/User2Installation.cs b/csharp/App/Backend/Relations/InstallationAccess.cs similarity index 79% rename from csharp/App/Backend/Relations/User2Installation.cs rename to csharp/App/Backend/Relations/InstallationAccess.cs index f898253db..c233ca953 100644 --- a/csharp/App/Backend/Relations/User2Installation.cs +++ b/csharp/App/Backend/Relations/InstallationAccess.cs @@ -2,7 +2,7 @@ using SQLite; namespace InnovEnergy.App.Backend.Relations; -public class User2Installation : Relation +public class InstallationAccess : Relation { [Indexed] public Int64 UserId { get => Left ; init => Left = value;} [Indexed] public Int64 InstallationId { get => Right; init => Right = value;}