rename User2Folder to FolderAccess, rename User2Installation to InstallationAccess
This commit is contained in:
parent
7cf27a78bc
commit
2cb3701fae
|
@ -34,13 +34,13 @@ public static partial class Db
|
||||||
return Connection.Insert(session) > 0;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -19,8 +19,8 @@ public static partial class Db
|
||||||
public static TableQuery<Folder> Folders => Connection.Table<Folder>();
|
public static TableQuery<Folder> Folders => Connection.Table<Folder>();
|
||||||
public static TableQuery<Installation> Installations => Connection.Table<Installation>();
|
public static TableQuery<Installation> Installations => Connection.Table<Installation>();
|
||||||
public static TableQuery<User> Users => Connection.Table<User>();
|
public static TableQuery<User> Users => Connection.Table<User>();
|
||||||
public static TableQuery<User2Folder> User2Folder => Connection.Table<User2Folder>();
|
public static TableQuery<FolderAccess> User2Folder => Connection.Table<FolderAccess>();
|
||||||
public static TableQuery<User2Installation> User2Installation => Connection.Table<User2Installation>();
|
public static TableQuery<InstallationAccess> User2Installation => Connection.Table<InstallationAccess>();
|
||||||
|
|
||||||
|
|
||||||
static Db()
|
static Db()
|
||||||
|
@ -32,8 +32,8 @@ public static partial class Db
|
||||||
Connection.CreateTable<User>();
|
Connection.CreateTable<User>();
|
||||||
Connection.CreateTable<Installation>();
|
Connection.CreateTable<Installation>();
|
||||||
Connection.CreateTable<Folder>();
|
Connection.CreateTable<Folder>();
|
||||||
Connection.CreateTable<User2Folder>();
|
Connection.CreateTable<FolderAccess>();
|
||||||
Connection.CreateTable<User2Installation>();
|
Connection.CreateTable<InstallationAccess>();
|
||||||
Connection.CreateTable<Session>();
|
Connection.CreateTable<Session>();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ public static partial class Db
|
||||||
foreach (var user in Users)
|
foreach (var user in Users)
|
||||||
while (Random.Shared.Next((Int32)(nUsers - user.Id + 1)) != 0)
|
while (Random.Shared.Next((Int32)(nUsers - user.Id + 1)) != 0)
|
||||||
{
|
{
|
||||||
var relation = new User2Folder
|
var relation = new FolderAccess
|
||||||
{
|
{
|
||||||
UserId = user.Id,
|
UserId = user.Id,
|
||||||
FolderId = Random.Shared.Next(nFolders) + 1
|
FolderId = Random.Shared.Next(nFolders) + 1
|
||||||
|
@ -89,7 +89,7 @@ public static partial class Db
|
||||||
foreach (var user in Users)
|
foreach (var user in Users)
|
||||||
while (Random.Shared.Next(5) != 0)
|
while (Random.Shared.Next(5) != 0)
|
||||||
{
|
{
|
||||||
var relation = new User2Installation
|
var relation = new InstallationAccess
|
||||||
{
|
{
|
||||||
UserId = user.Id,
|
UserId = user.Id,
|
||||||
InstallationId = Random.Shared.Next(nbInstallations) + 1
|
InstallationId = Random.Shared.Next(nbInstallations) + 1
|
||||||
|
|
|
@ -2,7 +2,7 @@ using SQLite;
|
||||||
|
|
||||||
namespace InnovEnergy.App.Backend.Relations;
|
namespace InnovEnergy.App.Backend.Relations;
|
||||||
|
|
||||||
public class User2Folder : Relation<Int64, Int64>
|
public class FolderAccess : Relation<Int64, Int64>
|
||||||
{
|
{
|
||||||
[Indexed] public Int64 UserId { get => Left ; init => Left = value;}
|
[Indexed] public Int64 UserId { get => Left ; init => Left = value;}
|
||||||
[Indexed] public Int64 FolderId { get => Right; init => Right = value;}
|
[Indexed] public Int64 FolderId { get => Right; init => Right = value;}
|
|
@ -2,7 +2,7 @@ using SQLite;
|
||||||
|
|
||||||
namespace InnovEnergy.App.Backend.Relations;
|
namespace InnovEnergy.App.Backend.Relations;
|
||||||
|
|
||||||
public class User2Installation : Relation<Int64, Int64>
|
public class InstallationAccess : Relation<Int64, Int64>
|
||||||
{
|
{
|
||||||
[Indexed] public Int64 UserId { get => Left ; init => Left = value;}
|
[Indexed] public Int64 UserId { get => Left ; init => Left = value;}
|
||||||
[Indexed] public Int64 InstallationId { get => Right; init => Right = value;}
|
[Indexed] public Int64 InstallationId { get => Right; init => Right = value;}
|
Loading…
Reference in New Issue