Archived
Private
Public Access
1
0

Initial commit

This commit is contained in:
2022-09-04 12:45:01 +02:00
commit f4a01d6a69
11601 changed files with 4206660 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
namespace WebDesktopBackend.Entitys.Files {
public class DirectoryContent {
public string[] Files { get; set; }
public string[] Directories { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
using System;
namespace WebDesktopBackend.Entitys.Files {
public class DirectoryInformation {
public string Name { get; set; }
public DateTime Created { get; set; }
public long Size { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
using System;
namespace WebDesktopBackend.Entitys.Files {
public class FileInformation {
public string Name { get; set; }
public DateTime Created { get; set; }
public long Size { get; set; }
}
}

View File

@@ -0,0 +1,7 @@
namespace WebDesktopBackend.Entitys.Files {
public class FileShare {
public string Id { get; set; }
public string Owner { get; set; }
public string File { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
namespace WebDesktopBackend.Entitys.Permissions {
public class Permission {
public const int NotSet = 0;
public const int Allow = 1;
public const int Deny = 2;
public int Id { get; set; }
public string UserId { get; set; }
public string PermissionName { get; set; }
public int Type { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace WebDesktopBackend.Entitys.Permissions {
public class PermissionGroup {
public string Permission { get; set; }
public string Name { get; set; }
public string[] Permissions { get; set; }
public string[] Inherits { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
namespace WebDesktopBackend.Entitys.Tokens {
public class AccessToken {
public string Id { get; set; }
public string RefreshTokenId { get; set; }
public DateTime ExpirationDate { get; set; }
}
public class AccessTokenResponse {
public string Id { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
using System;
namespace WebDesktopBackend.Entitys.Tokens {
public class RefreshToken {
public string Id { get; set; }
public string UserId { get; set; }
public DateTime ExpirationDate { get; set; }
}
}

View File

@@ -0,0 +1,6 @@
namespace WebDesktopBackend.Entitys.Tokens {
public class Tokens {
public RefreshToken refreshToken { get; set; }
public AccessToken accessToken { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using System;
namespace WebDesktopBackend.Entitys.User {
public class User : UserEditor {
public string Id { get; set; }
public DateTime Created { get; set; }
public User CreateCopy() {
return new User {
Id = Id,
Created = Created,
FirstName = FirstName,
LastName = LastName,
Email = Email,
Username = Username,
Password = "ENCRYPTED"
};
}
}
}

View File

@@ -0,0 +1,26 @@
namespace WebDesktopBackend.Entitys.User {
public class UserEditor {
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public void EditUser(User user) {
Trim();
user.FirstName = string.IsNullOrEmpty(FirstName) ? user.FirstName : FirstName;
user.LastName = string.IsNullOrEmpty(LastName) ? user.LastName : LastName;
user.Email = string.IsNullOrEmpty(Email) ? user.Email : Email;
user.Username = string.IsNullOrEmpty(Username) ? user.Username : Username;
user.Password = string.IsNullOrEmpty(Password) ? user.Password : Password;
}
public void Trim() {
FirstName = FirstName.Trim();
LastName = LastName.Trim();
Email = Email.Trim();
Username = Username.Trim();
Password = Password.Trim();
}
}
}

View File

@@ -0,0 +1,7 @@
namespace WebDesktopBackend.Entitys.User {
public class UserLogin {
public string Username { get; set; }
public string Email { get; set; }
public string Password { get; set; }
}
}