restructure

This commit is contained in:
Christian Werner 2025-03-02 20:41:26 +01:00
parent 98d05c363c
commit 41b834dd08
108 changed files with 330 additions and 285 deletions

5
.gitignore vendored
View File

@ -1,5 +0,0 @@
bin/
obj/
/packages/
riderModule.iml
/_ReSharper.Caches/

View File

@ -1,5 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="gandalf_reborn@localhost" uuid="7dce7e1a-2207-4e13-aae7-3d86ac8ce1d4">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<configured-by-url>true</configured-by-url>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://localhost:5432/gandalf_reborn?user=root&amp;password=root</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -1,6 +0,0 @@
namespace Abstractions;
public class InvokerContext
{
public Abstractions.Invoker? Invoker { get; set; }
}

View File

@ -1,14 +0,0 @@
using System.Linq.Expressions;
using LanguageExt.Common;
using Microsoft.EntityFrameworkCore;
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Security;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Tenant;
using W542.GandalfReborn.Data.Entities.Version;
namespace W542.GandalfReborn.Data.Database.Repositories;
public class AuthCodeRepository(ApplicationContext context) : GrRepository<AuthCodeEntity>(context), IAuthCodeRepository;
public interface IAuthCodeRepository : IGrRepository<AuthCodeEntity>;

View File

@ -1,3 +0,0 @@
namespace W542.GandalfReborn.Data.Entities.Base;
public interface IMappingEntity;

View File

@ -1,7 +0,0 @@
namespace W542.GandalfReborn.Data.Entities.Security;
public enum AuthorityType
{
Tenant,
App
}

View File

@ -1,7 +0,0 @@
namespace W542.GandalfReborn.Data.Entities.Security;
public enum TokenType
{
Application,
User
}

View File

@ -1,8 +0,0 @@
namespace W542.GandalfReborn.Data.Entities.Subject.SignIn;
public enum SignInMethod
{
Simple,
Google,
Steam
}

View File

@ -1,8 +0,0 @@
using W542.GandalfReborn.Data.Entities.Base;
namespace W542.GandalfReborn.Data.Entities.Tenant;
public abstract class OwnerData : VisibilityData
{
public required long OwnerId { get; set; }
}

97
src/dotnet/.gitignore vendored Normal file
View File

@ -0,0 +1,97 @@
# Created by https://www.toptal.com/developers/gitignore/api/rider
# Edit at https://www.toptal.com/developers/gitignore?templates=rider
### Rider ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
# End of https://www.toptal.com/developers/gitignore/api/rider
*.sln.DotSettings.user
.idea/**/.name
.idea/**/vcs.xml
*.db
*.db-wal
*.db-shm
**/bin/
**/obj/
.vs/
*.log
*.tlog

View File

@ -2,10 +2,10 @@
/shelf/
/workspace.xml
# Rider ignored files
/contentModel.xml
/.idea.Suspectus.GandalfReborn.iml
/modules.xml
/projectSettingsUpdater.xml
/contentModel.xml
/.idea.W542.GandalfReborn.iml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files

View File

@ -2,8 +2,7 @@
<project version="4">
<component name="UserContentModel">
<attachedFolders>
<Path>Docker</Path>
<Path>Scripts</Path>
<Path>../../../gandalf-reborn</Path>
</attachedFolders>
<explicitIncludes />
<explicitExcludes />

View File

@ -2,7 +2,7 @@ using System.Collections.Immutable;
using System.Security.Claims;
using System.Text.RegularExpressions;
namespace Abstractions;
namespace Suspectus.GandalfReborn.Abstractions;
public partial class Invoker
{

View File

@ -0,0 +1,6 @@
namespace Suspectus.GandalfReborn.Abstractions;
public class InvokerContext
{
public Invoker? Invoker { get; set; }
}

View File

@ -4,6 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Suspectus.GandalfReborn.Abstractions</RootNamespace>
</PropertyGroup>
</Project>

View File

@ -1,7 +1,7 @@
using LanguageExt.Common;
using W542.GandalfReborn.Data.Dto;
using Suspectus.GandalfReborn.Data.Dto;
namespace W542.GandalfReborn.Commands;
namespace Suspectus.GandalfReborn.Commands;
public class AuthCodeRequestCommand : IGrCommand<Result<AuthCodeDto>>
{

View File

@ -1,7 +1,7 @@
using LanguageExt.Common;
using W542.GandalfReborn.Data.Dto;
using Suspectus.GandalfReborn.Data.Dto;
namespace W542.GandalfReborn.Commands;
namespace Suspectus.GandalfReborn.Commands;
public class CreateAuthCodeCommand : IGrCommand<Result<AuthCodeDto>>
{

View File

@ -1,7 +1,7 @@
using LanguageExt.Common;
using W542.GandalfReborn.Data.Dto;
using Suspectus.GandalfReborn.Data.Dto;
namespace W542.GandalfReborn.Commands;
namespace Suspectus.GandalfReborn.Commands;
public class CreateTokensCommand : IGrCommand<Result<TokenDto>>
{

View File

@ -1,6 +1,6 @@
using LanguageExt.Common;
namespace W542.GandalfReborn.Commands;
namespace Suspectus.GandalfReborn.Commands;
public class HashPasswordCommand : IGrCommand<Result<string>>
{

View File

@ -1,5 +1,5 @@
using MediatR;
namespace W542.GandalfReborn.Commands;
namespace Suspectus.GandalfReborn.Commands;
public interface IGrCommand<out T> : IRequest<T>;

View File

@ -1,7 +1,7 @@
using LanguageExt.Common;
using W542.GandalfReborn.Data.Entities.Subject;
using Suspectus.GandalfReborn.Data.Entities.Subject;
namespace W542.GandalfReborn.Commands;
namespace Suspectus.GandalfReborn.Commands;
public class RegisterCommand : IGrCommand<Result<SubjectEntity>>
{

View File

@ -1,8 +1,8 @@
using MediatR;
using Microsoft.AspNetCore.Mvc;
using W542.GandalfReborn.Commands;
using Suspectus.GandalfReborn.Commands;
namespace W542.GandalfReborn.Controllers;
namespace Suspectus.GandalfReborn.Controllers;
[ApiController]
[Route("api/[controller]")]

View File

@ -1,6 +1,6 @@
using LanguageExt.Common;
namespace W542.GandalfReborn.Extensions;
namespace Suspectus.GandalfReborn.Extensions;
public static class ResultExtensions
{

View File

@ -1,6 +1,6 @@
using MediatR;
using W542.GandalfReborn.Commands;
using Suspectus.GandalfReborn.Commands;
namespace W542.GandalfReborn.Handlers.Commands;
namespace Suspectus.GandalfReborn.Handlers.Commands;
public interface IGrCommandHandler<in TCommand, TResult> : IRequestHandler<TCommand, TResult> where TCommand : IGrCommand<TResult>;

View File

@ -1,15 +1,13 @@
using LanguageExt.Common;
using MediatR;
using W542.GandalfReborn.Commands;
using W542.GandalfReborn.Data.Database.Repositories;
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Subject.SignIn;
using W542.GandalfReborn.Data.Entities.Tenant;
using W542.GandalfReborn.Extensions;
using W542.GandalfReborn.Handlers.Security;
using Suspectus.GandalfReborn.Commands;
using Suspectus.GandalfReborn.Data.Database.Repositories;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Subject;
using Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
using Suspectus.GandalfReborn.Extensions;
namespace W542.GandalfReborn.Handlers.Commands;
namespace Suspectus.GandalfReborn.Handlers.Commands;
public class RegisterCommandHandler(ISubjectRepository subjectRepository, IMediator mediator) : IGrCommandHandler<RegisterCommand, Result<SubjectEntity>>
{

View File

@ -2,14 +2,14 @@ using LanguageExt.Common;
using MediatR;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using W542.GandalfReborn.Commands;
using W542.GandalfReborn.Data.Database.Repositories;
using W542.GandalfReborn.Data.Dto;
using W542.GandalfReborn.Data.Entities.Subject.SignIn;
using W542.GandalfReborn.Extensions;
using W542.GandalfReborn.Handlers.Commands;
using Suspectus.GandalfReborn.Commands;
using Suspectus.GandalfReborn.Data.Database.Repositories;
using Suspectus.GandalfReborn.Data.Dto;
using Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
using Suspectus.GandalfReborn.Extensions;
using Suspectus.GandalfReborn.Handlers.Commands;
namespace W542.GandalfReborn.Handlers.Security;
namespace Suspectus.GandalfReborn.Handlers.Security;
public class AuthCodeRequestCommandHandler(IPasswordHasher<object> passwordHasher, ISubjectRepository subjectRepository, IMediator mediator) : IGrCommandHandler<AuthCodeRequestCommand, Result<AuthCodeDto>>
{

View File

@ -1,13 +1,13 @@
using AutoMapper;
using LanguageExt.Common;
using Microsoft.AspNetCore.Identity;
using W542.GandalfReborn.Commands;
using W542.GandalfReborn.Data.Database.Repositories;
using W542.GandalfReborn.Data.Dto;
using W542.GandalfReborn.Data.Entities.Security;
using W542.GandalfReborn.Handlers.Commands;
using Suspectus.GandalfReborn.Commands;
using Suspectus.GandalfReborn.Data.Database.Repositories;
using Suspectus.GandalfReborn.Data.Dto;
using Suspectus.GandalfReborn.Data.Entities.Security;
using Suspectus.GandalfReborn.Handlers.Commands;
namespace W542.GandalfReborn.Handlers.Security;
namespace Suspectus.GandalfReborn.Handlers.Security;
public class CreateAuthCodeCommandHandler(IPasswordHasher<object> passwordHasher, TimeProvider timeProvider, IAuthCodeRepository authCodeRepository, IMapper mapper) : IGrCommandHandler<CreateAuthCodeCommand, Result<AuthCodeDto>>
{

View File

@ -3,15 +3,15 @@ using JWT.Algorithms;
using JWT.Builder;
using JWT.Serializers;
using LanguageExt.Common;
using Security.Scheme;
using W542.GandalfReborn.Commands;
using W542.GandalfReborn.Data.Database.Repositories;
using W542.GandalfReborn.Data.Dto;
using W542.GandalfReborn.Data.Entities.Security;
using W542.GandalfReborn.Extensions;
using W542.GandalfReborn.Handlers.Commands;
using Suspectus.GandalfReborn.Commands;
using Suspectus.GandalfReborn.Data.Database.Repositories;
using Suspectus.GandalfReborn.Data.Dto;
using Suspectus.GandalfReborn.Data.Entities.Security;
using Suspectus.GandalfReborn.Extensions;
using Suspectus.GandalfReborn.Handlers.Commands;
using Suspectus.GandalfReborn.Security.Scheme;
namespace W542.GandalfReborn.Handlers.Security;
namespace Suspectus.GandalfReborn.Handlers.Security;
public class CreateTokensCommandHandler(TimeProvider timeProvider, IConfiguration configuration, IHashids hashids, ITokenMetadataRepository tokenMetadataRepository) : IGrCommandHandler<CreateTokensCommand, Result<TokenDto>>
{

View File

@ -3,14 +3,13 @@ using System.Text;
using LanguageExt.Common;
using MediatR;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using W542.GandalfReborn.Commands;
using W542.GandalfReborn.Data.Database.Repositories;
using W542.GandalfReborn.Data.Dto;
using W542.GandalfReborn.Extensions;
using W542.GandalfReborn.Handlers.Commands;
using Suspectus.GandalfReborn.Commands;
using Suspectus.GandalfReborn.Data.Database.Repositories;
using Suspectus.GandalfReborn.Data.Dto;
using Suspectus.GandalfReborn.Extensions;
using Suspectus.GandalfReborn.Handlers.Commands;
namespace W542.GandalfReborn.Handlers.Security;
namespace Suspectus.GandalfReborn.Handlers.Security;
public class GetTokensCommandHandler(IAuthCodeRepository authCodeRepository, TimeProvider timeProvider, IMediator mediator) : IGrCommandHandler<GetTokensCommand, Result<TokenDto>>
{

View File

@ -1,10 +1,10 @@
using LanguageExt.Common;
using Microsoft.AspNetCore.Identity;
using W542.GandalfReborn.Commands;
using W542.GandalfReborn.Extensions;
using W542.GandalfReborn.Handlers.Commands;
using Suspectus.GandalfReborn.Commands;
using Suspectus.GandalfReborn.Extensions;
using Suspectus.GandalfReborn.Handlers.Commands;
namespace W542.GandalfReborn.Handlers.Security;
namespace Suspectus.GandalfReborn.Handlers.Security;
public class PasswordHashingHandler(IPasswordHasher<object> passwordHasher) : IGrCommandHandler<HashPasswordCommand, Result<string>>
{

View File

@ -1,14 +1,12 @@
using System.Reflection;
using System.Text.Json.Serialization;
using Abstractions;
using HashidsNet;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Security;
using Security.Scheme;
using W542.GandalfReborn.Data.Database;
using W542.GandalfReborn.Data.Database.Repositories;
using Suspectus.GandalfReborn.Abstractions;
using Suspectus.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database.Repositories;
using Suspectus.GandalfReborn.Security.Scheme;
var builder = WebApplication.CreateBuilder(args);
@ -18,7 +16,7 @@ builder.Services.AddEndpointsApiExplorer();
builder.Services.AddDbContext<ApplicationContext>(cfg => cfg
.UseNpgsql(
builder.Configuration.GetConnectionString("DefaultConnection"),
x => x.MigrationsAssembly("Data")
x => x.MigrationsAssembly("Suspectus.GandalfReborn.Data")
)
);

View File

@ -4,7 +4,7 @@
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>W542.GandalfReborn</RootNamespace>
<RootNamespace>Suspectus.GandalfReborn</RootNamespace>
<LangVersion>12</LangVersion>
</PropertyGroup>
@ -23,8 +23,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Data\Data.csproj"/>
<ProjectReference Include="..\Security\Security.csproj"/>
<ProjectReference Include="..\Suspectus.GandalfReborn.Data\Suspectus.GandalfReborn.Data.csproj" />
<ProjectReference Include="..\Suspectus.GandalfReborn.Security\Suspectus.GandalfReborn.Security.csproj" />
</ItemGroup>
</Project>

View File

@ -1,15 +1,15 @@
using Abstractions;
using HashidsNet;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Security;
using W542.GandalfReborn.Data.Database;
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Security;
using W542.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Abstractions;
using Suspectus.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Security;
using Suspectus.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Security;
namespace W542.GandalfReborn;
namespace Suspectus.GandalfReborn;
[ApiController]
[Route("api/[controller]")]

View File

@ -1,14 +1,9 @@
using Abstractions;
using AutoMapper;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Security;
using W542.GandalfReborn.Data.Entities.Tenant;
using W542.GandalfReborn.Data.Entities.Version;
using W542.GandalfReborn.Data.Extensions;
using Suspectus.GandalfReborn.Abstractions;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Version;
namespace W542.GandalfReborn.Data.Database;
namespace Suspectus.GandalfReborn.Data.Database;
public sealed class ApplicationContext(DbContextOptions<ApplicationContext> options, InvokerContext invokerContext) : CoreContext<ApplicationContext>(options)
{

View File

@ -1,12 +1,12 @@
using Microsoft.EntityFrameworkCore;
using W542.GandalfReborn.Data.Entities.App;
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Security;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Subject.SignIn;
using W542.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Data.Entities.App;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Security;
using Suspectus.GandalfReborn.Data.Entities.Subject;
using Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
using Suspectus.GandalfReborn.Data.Entities.Tenant;
namespace W542.GandalfReborn.Data.Database;
namespace Suspectus.GandalfReborn.Data.Database;
public abstract class CoreContext<T>(DbContextOptions<T> options) : DbContext(options) where T : DbContext
{

View File

@ -1,9 +1,9 @@
using System.Data;
using System.Data.Common;
using Abstractions;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Suspectus.GandalfReborn.Abstractions;
namespace W542.GandalfReborn.Data.Database;
namespace Suspectus.GandalfReborn.Data.Database;
public class GrDbConnectionInterceptor(InvokerContext invokerContext) : IDbConnectionInterceptor
{

View File

@ -0,0 +1,7 @@
using Suspectus.GandalfReborn.Data.Entities.Security;
namespace Suspectus.GandalfReborn.Data.Database.Repositories;
public class AuthCodeRepository(ApplicationContext context) : GrRepository<AuthCodeEntity>(context), IAuthCodeRepository;
public interface IAuthCodeRepository : IGrRepository<AuthCodeEntity>;

View File

@ -1,9 +1,8 @@
using LanguageExt.Common;
using Microsoft.EntityFrameworkCore;
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Data.Entities.Base;
namespace W542.GandalfReborn.Data.Database.Repositories;
namespace Suspectus.GandalfReborn.Data.Database.Repositories;
public abstract class GrRepository<TEntity>(ApplicationContext context) : IGrRepository<TEntity> where TEntity : class, IEntity
{

View File

@ -1,7 +1,7 @@
using LanguageExt.Common;
using W542.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Base;
namespace W542.GandalfReborn.Data.Database.Repositories;
namespace Suspectus.GandalfReborn.Data.Database.Repositories;
public interface IGrRepository<TEntity> where TEntity : class, IEntity
{

View File

@ -1,8 +1,6 @@
using System.Linq.Expressions;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Version;
using Suspectus.GandalfReborn.Data.Entities.Subject;
namespace W542.GandalfReborn.Data.Database.Repositories;
namespace Suspectus.GandalfReborn.Data.Database.Repositories;
public class SubjectRepository(ApplicationContext context) : GrRepository<SubjectEntity>(context), ISubjectRepository;

View File

@ -1,7 +1,7 @@
using W542.GandalfReborn.Data.Entities.Security;
using Suspectus.GandalfReborn.Data.Entities.Security;
namespace W542.GandalfReborn.Data.Database.Repositories;
namespace Suspectus.GandalfReborn.Data.Database.Repositories;
public class TokenMetadataRepository(ApplicationContext context) : GrRepository<TokenMetadataEntity>(context), ITokenMetadataRepository;

View File

@ -1,4 +1,4 @@
namespace W542.GandalfReborn.Data.Dto;
namespace Suspectus.GandalfReborn.Data.Dto;
public class AuthCodeDto
{

View File

@ -1,4 +1,4 @@
namespace W542.GandalfReborn.Data.Dto;
namespace Suspectus.GandalfReborn.Data.Dto;
public class TokenDto
{

View File

@ -1,9 +1,9 @@
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Tenant;
using W542.GandalfReborn.Data.Entities.Version;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Subject;
using Suspectus.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Data.Entities.Version;
namespace W542.GandalfReborn.Data.Entities.App;
namespace Suspectus.GandalfReborn.Data.Entities.App;
public class AppRelationEntity : AppRelationData, IVersionableEntity
{

View File

@ -1,10 +1,10 @@
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Security;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Tenant;
using W542.GandalfReborn.Data.Entities.Version;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Security;
using Suspectus.GandalfReborn.Data.Entities.Subject;
using Suspectus.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Data.Entities.Version;
namespace W542.GandalfReborn.Data.Entities.App;
namespace Suspectus.GandalfReborn.Data.Entities.App;
public class AppSubjectRelationEntity : AppSubjectRelationData<long>, IMappingEntity, IVersionableEntity
{

View File

@ -1,4 +1,4 @@
namespace W542.GandalfReborn.Data.Entities.Base;
namespace Suspectus.GandalfReborn.Data.Entities.Base;
public enum EntityVisibility
{

View File

@ -1,4 +1,4 @@
namespace W542.GandalfReborn.Data.Entities.Base;
namespace Suspectus.GandalfReborn.Data.Entities.Base;
public interface IEntity
{

View File

@ -0,0 +1,3 @@
namespace Suspectus.GandalfReborn.Data.Entities.Base;
public interface IMappingEntity;

View File

@ -1,4 +1,4 @@
namespace W542.GandalfReborn.Data.Entities.Base;
namespace Suspectus.GandalfReborn.Data.Entities.Base;
public abstract class IdData : IEntity
{

View File

@ -1,4 +1,4 @@
namespace W542.GandalfReborn.Data.Entities.Base;
namespace Suspectus.GandalfReborn.Data.Entities.Base;
public abstract class SubjectData : VisibilityData
{

View File

@ -1,4 +1,4 @@
namespace W542.GandalfReborn.Data.Entities.Base;
namespace Suspectus.GandalfReborn.Data.Entities.Base;
public abstract class TenantRelationData : VisibilityData
{

View File

@ -1,4 +1,4 @@
namespace W542.GandalfReborn.Data.Entities.Base;
namespace Suspectus.GandalfReborn.Data.Entities.Base;
public abstract class VisibilityData : IdData
{

View File

@ -1,4 +1,4 @@
namespace W542.GandalfReborn.Data.Entities;
namespace Suspectus.GandalfReborn.Data.Entities;
[AttributeUsage(AttributeTargets.Property)]
public class ContentKeyAttribute : Attribute

View File

@ -1,10 +1,10 @@
using W542.GandalfReborn.Data.Entities.App;
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Tenant;
using W542.GandalfReborn.Data.Entities.Version;
using Suspectus.GandalfReborn.Data.Entities.App;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Subject;
using Suspectus.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Data.Entities.Version;
namespace W542.GandalfReborn.Data.Entities.Security;
namespace Suspectus.GandalfReborn.Data.Entities.Security;
public class AppSubjectRelationInternalAuthorityRelationEntity : AppSubjectRelationInternalAuthorityRelationData<long>, IMappingEntity, IVersionableEntity
{

View File

@ -1,6 +1,6 @@
using W542.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Base;
namespace W542.GandalfReborn.Data.Entities.Security;
namespace Suspectus.GandalfReborn.Data.Entities.Security;
public class AuthCodeEntity : IdData
{

View File

@ -1,8 +1,8 @@
using W542.GandalfReborn.Data.Entities.App;
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Data.Entities.App;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Tenant;
namespace W542.GandalfReborn.Data.Entities.Security;
namespace Suspectus.GandalfReborn.Data.Entities.Security;
public class AuthorityEntity : IdData
{

View File

@ -0,0 +1,7 @@
namespace Suspectus.GandalfReborn.Data.Entities.Security;
public enum AuthorityType
{
Tenant,
App
}

View File

@ -1,9 +1,9 @@
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Tenant;
using W542.GandalfReborn.Data.Entities.Version;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Subject;
using Suspectus.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Data.Entities.Version;
namespace W542.GandalfReborn.Data.Entities.Security;
namespace Suspectus.GandalfReborn.Data.Entities.Security;
public class TenantSubjectRelationInternalAuthorityRelationEntity : TenantSubjectRelationInternalAuthorityRelationData<long>, IMappingEntity, IVersionableEntity
{

View File

@ -1,9 +1,6 @@
using W542.GandalfReborn.Data.Entities.App;
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Data.Entities.Base;
namespace W542.GandalfReborn.Data.Entities.Security;
namespace Suspectus.GandalfReborn.Data.Entities.Security;
public class TokenMetadataEntity : IdData
{

View File

@ -0,0 +1,7 @@
namespace Suspectus.GandalfReborn.Data.Entities.Security;
public enum TokenType
{
Application,
User
}

View File

@ -1,6 +1,6 @@
using W542.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Base;
namespace W542.GandalfReborn.Data.Entities.Subject.SignIn;
namespace Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
public class SignInEntity : SubjectData
{

View File

@ -0,0 +1,8 @@
namespace Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
public enum SignInMethod
{
Simple,
Google,
Steam
}

View File

@ -1,9 +1,9 @@
using W542.GandalfReborn.Data.Entities.App;
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Subject.SignIn;
using W542.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Data.Entities.App;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Subject.SignIn;
using Suspectus.GandalfReborn.Data.Entities.Tenant;
namespace W542.GandalfReborn.Data.Entities.Subject;
namespace Suspectus.GandalfReborn.Data.Entities.Subject;
public class SubjectEntity : VisibilityData
{

View File

@ -0,0 +1,8 @@
using Suspectus.GandalfReborn.Data.Entities.Base;
namespace Suspectus.GandalfReborn.Data.Entities.Tenant;
public abstract class OwnerData : VisibilityData
{
public required long OwnerId { get; set; }
}

View File

@ -1,8 +1,8 @@
using W542.GandalfReborn.Data.Entities.App;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Version;
using Suspectus.GandalfReborn.Data.Entities.App;
using Suspectus.GandalfReborn.Data.Entities.Subject;
using Suspectus.GandalfReborn.Data.Entities.Version;
namespace W542.GandalfReborn.Data.Entities.Tenant;
namespace Suspectus.GandalfReborn.Data.Entities.Tenant;
public class TenantEntity : TenantData, IVersionableEntity
{

View File

@ -1,9 +1,9 @@
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Security;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Version;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Security;
using Suspectus.GandalfReborn.Data.Entities.Subject;
using Suspectus.GandalfReborn.Data.Entities.Version;
namespace W542.GandalfReborn.Data.Entities.Tenant;
namespace Suspectus.GandalfReborn.Data.Entities.Tenant;
public class TenantSubjectRelationEntity : TenantSubjectRelationData<long>, IMappingEntity, IVersionableEntity
{

View File

@ -1,8 +1,8 @@
using W542.GandalfReborn.Data.Entities.Base;
using W542.GandalfReborn.Data.Entities.Subject;
using W542.GandalfReborn.Data.Entities.Tenant;
using Suspectus.GandalfReborn.Data.Entities.Base;
using Suspectus.GandalfReborn.Data.Entities.Subject;
using Suspectus.GandalfReborn.Data.Entities.Tenant;
namespace W542.GandalfReborn.Data.Entities.Version;
namespace Suspectus.GandalfReborn.Data.Entities.Version;
public interface IVersionableBase : IEntity, IVersionableEntity;

View File

@ -1,4 +1,4 @@
namespace W542.GandalfReborn.Data.Entities.Version;
namespace Suspectus.GandalfReborn.Data.Entities.Version;
public enum VersionAction
{

View File

@ -1,6 +1,6 @@
using System.Text;
namespace W542.GandalfReborn.Data.Extensions;
namespace Suspectus.GandalfReborn.Data.Extensions;
public static class StringExtensions
{

View File

@ -1,8 +1,8 @@
using AutoMapper;
using W542.GandalfReborn.Data.Dto;
using W542.GandalfReborn.Data.Entities.Security;
using Suspectus.GandalfReborn.Data.Dto;
using Suspectus.GandalfReborn.Data.Entities.Security;
namespace W542.GandalfReborn.Data.Mapper;
namespace Suspectus.GandalfReborn.Data.Mapper;
public class AuthCodeDtoMappingProfile : Profile
{

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using W542.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using W542.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using W542.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using W542.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using W542.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using W542.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using W542.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using W542.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using W542.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using W542.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using W542.GandalfReborn.Data.Database;
using Suspectus.GandalfReborn.Data.Database;
#nullable disable

Some files were not shown because too many files have changed in this diff Show More