Added backend

This commit is contained in:
2022-02-20 19:04:11 +01:00
commit b789a8f8bf
78 changed files with 4382 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
using System;
namespace gswi.Model.DTOs
{
public class AdminUpdateUserDTO
{
public AuthUserDTO AuthUserDTO { get; set; }
public AuthUserDTO NewAuthUserDTO { get; set; }
public bool ChangePassword { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
using System;
namespace gswi.Model.DTOs
{
public class ApiVersionDTO
{
public string Major { get; set; }
public string Minor { get; set; }
public string Micro { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
namespace gswi.Model.DTOs
{
public class AuthUserDTO
{
public long Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string EMail { get; set; }
public string Password { get; set; }
public bool IsConfirmed { get; set; }
public AuthRoles AuthRole { get; set; }
public AuthUser ToAuthUser()
{
return new AuthUser
{
Id = this.Id,
FirstName = this.FirstName,
LastName = this.LastName,
EMail = this.EMail,
Password = this.Password,
AuthRole = this.AuthRole
};
}
}
}

View File

@@ -0,0 +1,9 @@
using System;
namespace gswi.Model.DTOs
{
public class EMailStringDTO
{
public string EMail { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
using System.Collections.Generic;
namespace gswi.Model.DTOs
{
public class GetFilteredAuthUsersResultDTO
{
public List<AuthUserDTO> Users { get; set; }
public int TotalCount { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
using System;
namespace gswi.Model.DTOs
{
public class ResetPasswordDTO
{
public string Id { get; set; }
public string Password { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
using System;
namespace gswi.Model.DTOs
{
public class SettingsDTO
{
public string WebVersion { get; set; }
public string ApiVersion { get; set; }
public string ConfigPath { get; set; }
public string WebBaseURL { get; set; }
public string ApiBaseURL { get; set; }
public int TokenExpireTime { get; set; }
public int RefreshTokenExpireTime { get; set; }
public string MailUser { get; set; }
public int MailPort { get; set; }
public string MailHost { get; set; }
public string MailTransceiver { get; set; }
public string MailTransceiverAddress { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace gswi.Model.DTOs
{
public class TokenDTO
{
public string Token { get; set; }
public string RefreshToken { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
using System;
namespace gswi.Model.DTOs
{
public class UpdateUserDTO
{
public AuthUserDTO AuthUserDTO { get; set; }
public AuthUserDTO NewAuthUserDTO { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace gswi.Model.DTOs
{
public abstract class UserDTO
{
public long Id { get; set; }
public string Name { get; set; }
public bool NotifyWhenLogin { get; set; }
}
}