Rename projects to FileShare

This commit is contained in:
luoqian 2026-05-22 14:29:22 +08:00
parent 8270cf198b
commit 9f8da2c063
154 changed files with 394 additions and 398 deletions

52
.gitignore vendored
View File

@ -2,34 +2,30 @@
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。 # 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################ ################################################################################
/Avalonia-PC/bin /FileShare-PC/bin
/Avalonia-PC/.vs /FileShare-PC/.vs
/Avalonia-PC/obj /FileShare-PC/obj
/Avalonia-API/bin /FileShare-API/bin
/Avalonia-API/obj /FileShare-API/obj
/Avalonia-Services/bin /FileShare-Services/bin
/Avalonia-Services/obj /FileShare-Services/obj
/Avalonia-Web-VUE/.vscode /FileShare-Web-VUE/.vscode
/Avalonia-Web-VUE/obj /FileShare-Web-VUE/obj
/Avalonia-Web-VUE/node_modules /FileShare-Web-VUE/node_modules
/Avalonia-Web-VUE/dist /FileShare-Web-VUE/dist
/Avalonia-Web-VUE/.vscode /FileShare-Web-VUE/.vscode
/avalonia-web-react/obj /FileShare-EFCore/bin
/avalonia-web-react/obj /FileShare-EFCore/obj
/avalonia-web-react/node_modules /FileShare-Common/bin
/avalonia-web-react/dist /FileShare-Common/obj
/Avalonia-EFCore/bin /FileShare-API/logs
/Avalonia-EFCore/obj /FileShare-API/fileshare-api.db
/Avalonia-Common/bin /FileShare-API/fileshare-api.db-shm
/Avalonia-Common/obj /FileShare-API/fileshare-api.db-wal
/Avalonia-API/logs /FileShare-API/app.db
/Avalonia-API/avalonia-api.db /FileShare-API/app.db-shm
/Avalonia-API/avalonia-api.db-shm /FileShare-API/app.db-wal
/Avalonia-API/avalonia-api.db-wal /FileShare-API/wwwroot
/Avalonia-API/app.db
/Avalonia-API/app.db-shm
/Avalonia-API/app.db-wal
/Avalonia-API/wwwroot
/package-output /package-output
/package-scripts/tools /package-scripts/tools
/.vs /.vs

View File

@ -1,6 +0,0 @@
@Avalonia_API_HostAddress = http://localhost:5206
GET {{Avalonia_API_HostAddress}}/weatherforecast/
Accept: application/json
###

View File

@ -1,11 +0,0 @@
<Solution>
<Project Path="../Avalonia-API/Avalonia-API.csproj" Id="e33aba9a-a56b-4f6b-8eaa-3acbed65ebad" />
<Project Path="../Avalonia-Common/Avalonia-Common.csproj" Id="caed4118-2161-4382-90b8-35fb4efe3b5f" />
<Project Path="../Avalonia-EFCore/Avalonia-EFCore.csproj" Id="64557501-62a7-4863-b2bf-1570b8c6fecb" />
<Project Path="../Avalonia-Services/Avalonia-Services.csproj" Id="b8757cf9-5422-4c67-acae-3c967c95f866" />
<Project Path="../Avalonia-Web-VUE/avalonia-web-vue.esproj">
<Build />
<Deploy />
</Project>
<Project Path="Avalonia-PC.csproj" />
</Solution>

View File

@ -1,11 +1,11 @@
using Avalonia_Common.Core; using FileShare_Common.Core;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Avalonia_EFCore.Models; using FileShare_EFCore.Models;
using Avalonia_Services.Core; using FileShare_Services.Core;
using Avalonia_Services.Services.AuthService; using FileShare_Services.Services.AuthService;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace Avalonia_API.Authentication namespace FileShare_API.Authentication
{ {
/// <summary> /// <summary>
/// API 鉴权端点服务,实现 <see cref="IApiAuthEndpointService"/> /// API 鉴权端点服务,实现 <see cref="IApiAuthEndpointService"/>

View File

@ -1,4 +1,4 @@
namespace Avalonia_API.Authentication namespace FileShare_API.Authentication
{ {
/// <summary> /// <summary>
/// JWT 鉴权配置选项,从 appsettings.json 的 Jwt 节绑定。 /// JWT 鉴权配置选项,从 appsettings.json 的 Jwt 节绑定。
@ -8,12 +8,12 @@ namespace Avalonia_API.Authentication
/// <summary> /// <summary>
/// 获取或设置 Token 签发者。 /// 获取或设置 Token 签发者。
/// </summary> /// </summary>
public string Issuer { get; set; } = "Avalonia-API"; public string Issuer { get; set; } = "FileShare-API";
/// <summary> /// <summary>
/// 获取或设置 Token 受众。 /// 获取或设置 Token 受众。
/// </summary> /// </summary>
public string Audience { get; set; } = "Avalonia-Client"; public string Audience { get; set; } = "FileShare-Client";
/// <summary> /// <summary>
/// 获取或设置签名密钥(至少 32 字节)。 /// 获取或设置签名密钥(至少 32 字节)。

View File

@ -1,11 +1,11 @@
using Avalonia_EFCore.Models; using FileShare_EFCore.Models;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims; using System.Security.Claims;
using System.Text; using System.Text;
namespace Avalonia_API.Authentication namespace FileShare_API.Authentication
{ {
/// <summary> /// <summary>
/// JWT Token 服务,负责创建包含用户声明和角色的 Access Token。 /// JWT Token 服务,负责创建包含用户声明和角色的 Access Token。

View File

@ -1,11 +1,11 @@
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Avalonia_EFCore.Models; using FileShare_EFCore.Models;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
namespace Avalonia_API.Authentication namespace FileShare_API.Authentication
{ {
/// <summary> /// <summary>
/// Refresh Token 服务,负责创建、查找、撤销和轮换 Refresh Token /// Refresh Token 服务,负责创建、查找、撤销和轮换 Refresh Token

View File

@ -1,18 +1,18 @@
using Avalonia_API.Authentication; using FileShare_API.Authentication;
using Avalonia_API.Services; using FileShare_API.Services;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Avalonia_Services.Core; using FileShare_Services.Core;
using Avalonia_Services.Endpoints; using FileShare_Services.Endpoints;
using Avalonia_Services.Services; using FileShare_Services.Services;
using Avalonia_Services.Services.AuthService; using FileShare_Services.Services.AuthService;
using Avalonia_Services.Services.FileLibrary; using FileShare_Services.Services.FileLibrary;
using Avalonia_Services.Services.QrCode; using FileShare_Services.Services.QrCode;
using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using System.Text; using System.Text;
namespace Avalonia_API.Configuration namespace FileShare_API.Configuration
{ {
/// <summary> /// <summary>
/// API 项目服务配置扩展类,负责注册数据库、鉴权、业务服务和统一端点。 /// API 项目服务配置扩展类,负责注册数据库、鉴权、业务服务和统一端点。
@ -21,7 +21,7 @@ namespace Avalonia_API.Configuration
{ {
/// <summary> /// <summary>
/// 注册统一端点及其依赖的服务(含数据库)。 /// 注册统一端点及其依赖的服务(含数据库)。
/// 所有业务端点定义在 Avalonia-Services/Endpoints/AppEndpoints.cs。 /// 所有业务端点定义在 FileShare-Services/Endpoints/AppEndpoints.cs。
/// </summary> /// </summary>
public static IServiceCollection AddUnifiedApiServices(this IServiceCollection services, IConfiguration configuration) public static IServiceCollection AddUnifiedApiServices(this IServiceCollection services, IConfiguration configuration)
{ {

View File

@ -1,6 +1,6 @@
using Avalonia_Services.Services.FileLibrary; using FileShare_Services.Services.FileLibrary;
namespace Avalonia_API.Extensions namespace FileShare_API.Extensions
{ {
/// <summary> /// <summary>
/// API-only raw file stream endpoints used by browser media elements. /// API-only raw file stream endpoints used by browser media elements.

View File

@ -1,14 +1,14 @@
using Avalonia_Services.Core; using FileShare_Services.Core;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using AspNetCoreFilterContext = Microsoft.AspNetCore.Http.EndpointFilterInvocationContext; using AspNetCoreFilterContext = Microsoft.AspNetCore.Http.EndpointFilterInvocationContext;
using AspNetCoreFilterDelegate = Microsoft.AspNetCore.Http.EndpointFilterDelegate; using AspNetCoreFilterDelegate = Microsoft.AspNetCore.Http.EndpointFilterDelegate;
// 解决与 ASP.NET Core 同名类型的冲突 // 解决与 ASP.NET Core 同名类型的冲突
using UnifiedFilter = Avalonia_Services.Core.IEndpointFilter; using UnifiedFilter = FileShare_Services.Core.IEndpointFilter;
namespace Avalonia_API.Extensions namespace FileShare_API.Extensions
{ {
/// <summary> /// <summary>
/// 将 Avalonia-Services 的统一端点映射到 ASP.NET Core Minimal API。 /// 将 FileShare-Services 的统一端点映射到 ASP.NET Core Minimal API。
/// 支持鉴权、过滤器、中间件的完整 ASP.NET Core 管道。 /// 支持鉴权、过滤器、中间件的完整 ASP.NET Core 管道。
/// </summary> /// </summary>
public static class UnifiedEndpointExtensions public static class UnifiedEndpointExtensions

View File

@ -4,7 +4,7 @@
<TargetFramework>net10.0</TargetFramework> <TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Avalonia_API</RootNamespace> <RootNamespace>FileShare_API</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -19,27 +19,27 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Avalonia-Services\Avalonia-Services.csproj" /> <ProjectReference Include="..\FileShare-Services\FileShare-Services.csproj" />
<ProjectReference Include="..\Avalonia-Common\Avalonia-Common.csproj" /> <ProjectReference Include="..\FileShare-Common\FileShare-Common.csproj" />
<ProjectReference Include="..\Avalonia-EFCore\Avalonia-EFCore.csproj" /> <ProjectReference Include="..\FileShare-EFCore\FileShare-EFCore.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Controllers\" /> <Folder Include="Controllers\" />
</ItemGroup> </ItemGroup>
<Target Name="RestoreFrontendPackages" BeforeTargets="Build" Condition="'$(SkipFrontendBuild)' != 'true' And Exists('..\Avalonia-Web-VUE\package.json') And !Exists('..\Avalonia-Web-VUE\node_modules')"> <Target Name="RestoreFrontendPackages" BeforeTargets="Build" Condition="'$(SkipFrontendBuild)' != 'true' And Exists('..\FileShare-Web-VUE\package.json') And !Exists('..\FileShare-Web-VUE\node_modules')">
<Message Importance="high" Text="Restoring Avalonia-Web-VUE npm packages..." /> <Message Importance="high" Text="Restoring FileShare-Web-VUE npm packages..." />
<Exec WorkingDirectory="..\Avalonia-Web-VUE" Command="npm.cmd install" /> <Exec WorkingDirectory="..\FileShare-Web-VUE" Command="npm.cmd install" />
</Target> </Target>
<Target Name="BuildFrontend" BeforeTargets="Build" DependsOnTargets="RestoreFrontendPackages" Condition="'$(SkipFrontendBuild)' != 'true' And Exists('..\Avalonia-Web-VUE\package.json')"> <Target Name="BuildFrontend" BeforeTargets="Build" DependsOnTargets="RestoreFrontendPackages" Condition="'$(SkipFrontendBuild)' != 'true' And Exists('..\FileShare-Web-VUE\package.json')">
<Message Importance="high" Text="Building Avalonia-Web-VUE into Avalonia-API/wwwroot..." /> <Message Importance="high" Text="Building FileShare-Web-VUE into FileShare-API/wwwroot..." />
<Exec WorkingDirectory="..\Avalonia-Web-VUE" Command="npm.cmd run build-only" /> <Exec WorkingDirectory="..\FileShare-Web-VUE" Command="npm.cmd run build-only" />
<RemoveDir Directories="wwwroot" /> <RemoveDir Directories="wwwroot" />
<MakeDir Directories="wwwroot" /> <MakeDir Directories="wwwroot" />
<ItemGroup> <ItemGroup>
<FrontendDist Include="..\Avalonia-Web-VUE\dist\**\*.*" /> <FrontendDist Include="..\FileShare-Web-VUE\dist\**\*.*" />
</ItemGroup> </ItemGroup>
<Copy SourceFiles="@(FrontendDist)" DestinationFiles="@(FrontendDist->'wwwroot\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="false" /> <Copy SourceFiles="@(FrontendDist)" DestinationFiles="@(FrontendDist->'wwwroot\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="false" />
</Target> </Target>

View File

@ -0,0 +1,6 @@
@FileShare_API_HostAddress = http://localhost:5206
GET {{FileShare_API_HostAddress}}/weatherforecast/
Accept: application/json
###

View File

@ -1,13 +1,13 @@
using Avalonia_API.Configuration; using FileShare_API.Configuration;
using Avalonia_API.Extensions; using FileShare_API.Extensions;
using Avalonia_Common.Infrastructure; using FileShare_Common.Infrastructure;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Avalonia_Services.Core; using FileShare_Services.Core;
using Serilog; using Serilog;
// 初始化日志系统 // 初始化日志系统
Log.Logger = LoggingConfiguration.CreateDefaultLogger(logDir: "logs"); Log.Logger = LoggingConfiguration.CreateDefaultLogger(logDir: "logs");
Log.Information("Avalonia-API 正在启动..."); Log.Information("FileShare-API 正在启动...");
try try
{ {
@ -30,7 +30,7 @@ try
.AllowAnyMethod()); .AllowAnyMethod());
}); });
// 注册统一端点及业务服务(入口在 Avalonia-Services/Endpoints/AppEndpoints.cs // 注册统一端点及业务服务(入口在 FileShare-Services/Endpoints/AppEndpoints.cs
builder.Services.AddUnifiedApiServices(builder.Configuration); builder.Services.AddUnifiedApiServices(builder.Configuration);
var app = builder.Build(); var app = builder.Build();
@ -46,7 +46,7 @@ try
app.MapOpenApi(); app.MapOpenApi();
app.UseSwaggerUI(options => app.UseSwaggerUI(options =>
{ {
options.SwaggerEndpoint("/openapi/v1.json", "Avalonia API v1"); options.SwaggerEndpoint("/openapi/v1.json", "FileShare API v1");
options.RoutePrefix = "swagger"; options.RoutePrefix = "swagger";
}); });
} }
@ -67,7 +67,7 @@ try
} }
catch (Exception ex) catch (Exception ex)
{ {
Log.Fatal(ex, "Avalonia-API 启动失败"); Log.Fatal(ex, "FileShare-API 启动失败");
} }
finally finally
{ {

View File

@ -1,6 +1,6 @@
using Avalonia_Services.Services.FileLibrary; using FileShare_Services.Services.FileLibrary;
namespace Avalonia_API.Services namespace FileShare_API.Services
{ {
public sealed class FileLibraryScanHostedService(IServiceScopeFactory scopeFactory, ILogger<FileLibraryScanHostedService> logger) public sealed class FileLibraryScanHostedService(IServiceScopeFactory scopeFactory, ILogger<FileLibraryScanHostedService> logger)
: BackgroundService : BackgroundService

View File

@ -7,8 +7,8 @@
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"Jwt": { "Jwt": {
"Issuer": "Avalonia-API", "Issuer": "FileShare-API",
"Audience": "Avalonia-Client", "Audience": "FileShare-Client",
"SigningKey": "change-this-development-signing-key-at-least-32-bytes", "SigningKey": "change-this-development-signing-key-at-least-32-bytes",
"AccessTokenMinutes": 60, "AccessTokenMinutes": 60,
"RefreshTokenDays": 30 "RefreshTokenDays": 30

View File

@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Avalonia_Common.Core namespace FileShare_Common.Core
{ {
/// <summary> /// <summary>
/// 统一端点响应契约。 /// 统一端点响应契约。

View File

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net10.0</TargetFramework> <TargetFramework>net10.0</TargetFramework>
<RootNamespace>Avalonia_Common</RootNamespace> <RootNamespace>FileShare_Common</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>

View File

@ -1,10 +1,10 @@
using Serilog; using Serilog;
using Serilog.Events; using Serilog.Events;
namespace Avalonia_Common.Infrastructure namespace FileShare_Common.Infrastructure
{ {
/// <summary> /// <summary>
/// Serilog 日志配置 —— 可在 Avalonia-API 和 Avalonia-PC 中共享。 /// Serilog 日志配置 —— 可在 FileShare-API 和 FileShare-PC 中共享。
/// </summary> /// </summary>
public static class LoggingConfiguration public static class LoggingConfiguration
{ {

View File

@ -1,12 +1,12 @@
using Avalonia_EFCore.Models; using FileShare_EFCore.Models;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace Avalonia_EFCore.Database namespace FileShare_EFCore.Database
{ {
/// <summary> /// <summary>
/// 应用数据库上下文 —— 继承自 Avalonia-EFCore 的 AppDbContext。 /// 应用数据库上下文 —— 继承自 FileShare-EFCore 的 AppDbContext。
/// 所有业务实体在此注册 DbSet。 /// 所有业务实体在此注册 DbSet。
/// 这是 Avalonia-API 和 Avalonia-PC 共用的具体数据上下文。 /// 这是 FileShare-API 和 FileShare-PC 共用的具体数据上下文。
/// </summary> /// </summary>
public class AppDataContext(DatabaseConfiguration dbConfig) : AppDbContext(dbConfig) public class AppDataContext(DatabaseConfiguration dbConfig) : AppDbContext(dbConfig)
{ {

View File

@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore.Design; using Microsoft.EntityFrameworkCore.Design;
namespace Avalonia_EFCore.Database namespace FileShare_EFCore.Database
{ {
/// <summary> /// <summary>
/// 设计时 DbContext 工厂,用于 EF Core 迁移工具生成迁移代码。 /// 设计时 DbContext 工厂,用于 EF Core 迁移工具生成迁移代码。
@ -67,11 +67,11 @@ namespace Avalonia_EFCore.Database
var provider = GetProvider(args) ?? defaultProvider; var provider = GetProvider(args) ?? defaultProvider;
return provider switch return provider switch
{ {
DatabaseProvider.SQLite => DatabaseConfiguration.ForSQLite("avalonia-api.db"), DatabaseProvider.SQLite => DatabaseConfiguration.ForSQLite("fileshare-api.db"),
DatabaseProvider.SqlServer => DatabaseConfiguration.ForSqlServer("(localdb)\\MSSQLLocalDB", "AvaloniaApi"), DatabaseProvider.SqlServer => DatabaseConfiguration.ForSqlServer("(localdb)\\MSSQLLocalDB", "FileShareApi"),
DatabaseProvider.PostgreSQL => DatabaseConfiguration.ForPostgreSQL("localhost", "avalonia_api", "postgres", "postgres"), DatabaseProvider.PostgreSQL => DatabaseConfiguration.ForPostgreSQL("localhost", "fileshare_api", "postgres", "postgres"),
DatabaseProvider.MySQL => DatabaseConfiguration.ForMySQL("localhost", "avalonia_api", "root", "root"), DatabaseProvider.MySQL => DatabaseConfiguration.ForMySQL("localhost", "fileshare_api", "root", "root"),
_ => DatabaseConfiguration.ForSQLite("avalonia-api.db"), _ => DatabaseConfiguration.ForSQLite("fileshare-api.db"),
}; };
} }

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Avalonia_EFCore.Database namespace FileShare_EFCore.Database
{ {
/// <summary> /// <summary>
/// 应用数据库上下文基类 —— 自动根据 DatabaseConfiguration 选择数据库提供程序。 /// 应用数据库上下文基类 —— 自动根据 DatabaseConfiguration 选择数据库提供程序。

View File

@ -1,4 +1,4 @@
namespace Avalonia_EFCore.Database namespace FileShare_EFCore.Database
{ {
/// <summary> /// <summary>
/// 支持的数据库提供程序类型。 /// 支持的数据库提供程序类型。

View File

@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace Avalonia_EFCore.Database namespace FileShare_EFCore.Database
{ {
/// <summary> /// <summary>
/// 数据库服务注册扩展 —— 在 Program.cs 中一行配置数据库。 /// 数据库服务注册扩展 —— 在 Program.cs 中一行配置数据库。

View File

@ -1,4 +1,4 @@
using Avalonia_Common.Infrastructure; using FileShare_Common.Infrastructure;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
@ -9,7 +9,7 @@ using System.Reflection;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Avalonia_EFCore.Database namespace FileShare_EFCore.Database
{ {
/// <summary> /// <summary>
/// 数据库管理器 —— 负责连接测试、自动迁移、种子数据、版本检查。 /// 数据库管理器 —— 负责连接测试、自动迁移、种子数据、版本检查。

View File

@ -1,12 +1,12 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace Avalonia_EFCore.Database namespace FileShare_EFCore.Database
{ {
/// <summary> /// <summary>
/// 数据库提供程序注册表 —— 统一注册所有支持的提供程序配置委托。 /// 数据库提供程序注册表 —— 统一注册所有支持的提供程序配置委托。
/// 具体使用哪个提供程序由各宿主项目决定: /// 具体使用哪个提供程序由各宿主项目决定:
/// Avalonia-API从 appsettings.json 的 DatabaseConfiguration 节读取; /// FileShare-API从 appsettings.json 的 DatabaseConfiguration 节读取;
/// Avalonia-PC :固定使用 SQLite。 /// FileShare-PC :固定使用 SQLite。
/// </summary> /// </summary>
public static class DatabaseProviderRegistry public static class DatabaseProviderRegistry
{ {
@ -37,7 +37,7 @@ namespace Avalonia_EFCore.Database
} }
/// <summary> /// <summary>
/// 注册所有内置提供程序的默认配置(四个包均已内置在 Avalonia-EFCore 中)。 /// 注册所有内置提供程序的默认配置(四个包均已内置在 FileShare-EFCore 中)。
/// 注册完成后由调用方根据自身需求选择具体的 <see cref="DatabaseProvider"/>。 /// 注册完成后由调用方根据自身需求选择具体的 <see cref="DatabaseProvider"/>。
/// </summary> /// </summary>
public static void RegisterDefaults() public static void RegisterDefaults()

View File

@ -1,4 +1,4 @@
namespace Avalonia_EFCore.Database namespace FileShare_EFCore.Database
{ {
/// <summary> /// <summary>
/// SQLite 专用 DbContext用于隔离 SQLite 迁移集。 /// SQLite 专用 DbContext用于隔离 SQLite 迁移集。

View File

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net10.0</TargetFramework> <TargetFramework>net10.0</TargetFramework>
<RootNamespace>Avalonia_EFCore</RootNamespace> <RootNamespace>FileShare_EFCore</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
@ -22,7 +22,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Avalonia-Common\Avalonia-Common.csproj" /> <ProjectReference Include="..\FileShare-Common\FileShare-Common.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.MySQL namespace FileShare_EFCore.Migrations.MySQL
{ {
[DbContext(typeof(MySqlAppDataContext))] [DbContext(typeof(MySqlAppDataContext))]
[Migration("20260520082626_AutoMigration_20260520162543")] [Migration("20260520082626_AutoMigration_20260520162543")]
@ -22,7 +22,7 @@ namespace Avalonia_EFCore.Migrations.MySQL
.HasAnnotation("ProductVersion", "10.0.7") .HasAnnotation("ProductVersion", "10.0.7")
.HasAnnotation("Relational:MaxIdentifierLength", 64); .HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -82,7 +82,7 @@ namespace Avalonia_EFCore.Migrations.MySQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -127,7 +127,7 @@ namespace Avalonia_EFCore.Migrations.MySQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -1,10 +1,10 @@
using System; using System;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using MySql.EntityFrameworkCore.Metadata; using MySql.EntityFrameworkCore.Metadata;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.MySQL namespace FileShare_EFCore.Migrations.MySQL
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AutoMigration_20260520162543 : Migration public partial class AutoMigration_20260520162543 : Migration

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.MySQL namespace FileShare_EFCore.Migrations.MySQL
{ {
[DbContext(typeof(MySqlAppDataContext))] [DbContext(typeof(MySqlAppDataContext))]
[Migration("20260520083306_AutoMigration_20260520163216")] [Migration("20260520083306_AutoMigration_20260520163216")]
@ -22,7 +22,7 @@ namespace Avalonia_EFCore.Migrations.MySQL
.HasAnnotation("ProductVersion", "10.0.7") .HasAnnotation("ProductVersion", "10.0.7")
.HasAnnotation("Relational:MaxIdentifierLength", 64); .HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -82,7 +82,7 @@ namespace Avalonia_EFCore.Migrations.MySQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -133,7 +133,7 @@ namespace Avalonia_EFCore.Migrations.MySQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -1,8 +1,8 @@
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.MySQL namespace FileShare_EFCore.Migrations.MySQL
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AutoMigration_20260520163216 : Migration public partial class AutoMigration_20260520163216 : Migration

View File

@ -1,13 +1,13 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.MySQL namespace FileShare_EFCore.Migrations.MySQL
{ {
[DbContext(typeof(MySqlAppDataContext))] [DbContext(typeof(MySqlAppDataContext))]
partial class MySqlAppDataContextModelSnapshot : ModelSnapshot partial class MySqlAppDataContextModelSnapshot : ModelSnapshot
@ -19,7 +19,7 @@ namespace Avalonia_EFCore.Migrations.MySQL
.HasAnnotation("ProductVersion", "10.0.7") .HasAnnotation("ProductVersion", "10.0.7")
.HasAnnotation("Relational:MaxIdentifierLength", 64); .HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -79,7 +79,7 @@ namespace Avalonia_EFCore.Migrations.MySQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -130,7 +130,7 @@ namespace Avalonia_EFCore.Migrations.MySQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
@ -9,7 +9,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.PostgreSQL namespace FileShare_EFCore.Migrations.PostgreSQL
{ {
[DbContext(typeof(PostgreSqlAppDataContext))] [DbContext(typeof(PostgreSqlAppDataContext))]
[Migration("20260520082617_AutoMigration_20260520162543")] [Migration("20260520082617_AutoMigration_20260520162543")]
@ -25,7 +25,7 @@ namespace Avalonia_EFCore.Migrations.PostgreSQL
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -87,7 +87,7 @@ namespace Avalonia_EFCore.Migrations.PostgreSQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -134,7 +134,7 @@ namespace Avalonia_EFCore.Migrations.PostgreSQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -1,10 +1,10 @@
using System; using System;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.PostgreSQL namespace FileShare_EFCore.Migrations.PostgreSQL
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AutoMigration_20260520162543 : Migration public partial class AutoMigration_20260520162543 : Migration

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
@ -9,7 +9,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.PostgreSQL namespace FileShare_EFCore.Migrations.PostgreSQL
{ {
[DbContext(typeof(PostgreSqlAppDataContext))] [DbContext(typeof(PostgreSqlAppDataContext))]
[Migration("20260520083254_AutoMigration_20260520163216")] [Migration("20260520083254_AutoMigration_20260520163216")]
@ -25,7 +25,7 @@ namespace Avalonia_EFCore.Migrations.PostgreSQL
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -87,7 +87,7 @@ namespace Avalonia_EFCore.Migrations.PostgreSQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -140,7 +140,7 @@ namespace Avalonia_EFCore.Migrations.PostgreSQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -1,8 +1,8 @@
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.PostgreSQL namespace FileShare_EFCore.Migrations.PostgreSQL
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AutoMigration_20260520163216 : Migration public partial class AutoMigration_20260520163216 : Migration

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
@ -8,7 +8,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.PostgreSQL namespace FileShare_EFCore.Migrations.PostgreSQL
{ {
[DbContext(typeof(PostgreSqlAppDataContext))] [DbContext(typeof(PostgreSqlAppDataContext))]
partial class PostgreSqlAppDataContextModelSnapshot : ModelSnapshot partial class PostgreSqlAppDataContextModelSnapshot : ModelSnapshot
@ -22,7 +22,7 @@ namespace Avalonia_EFCore.Migrations.PostgreSQL
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -84,7 +84,7 @@ namespace Avalonia_EFCore.Migrations.PostgreSQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -137,7 +137,7 @@ namespace Avalonia_EFCore.Migrations.PostgreSQL
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -1,12 +1,12 @@
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SQLite namespace FileShare_EFCore.Migrations.SQLite
{ {
[DbContext(typeof(SqliteAppDataContext))] [DbContext(typeof(SqliteAppDataContext))]
[Migration("20260514000100_InitialCreate")] [Migration("20260514000100_InitialCreate")]
@ -18,7 +18,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "10.0.0"); .HasAnnotation("ProductVersion", "10.0.0");
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.HasComment("用户主键") .HasComment("用户主键")
@ -52,7 +52,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.HasComment("天气预报主键") .HasComment("天气预报主键")

View File

@ -4,7 +4,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SQLite namespace FileShare_EFCore.Migrations.SQLite
{ {
/// <summary> /// <summary>
/// 初始数据库基线。后续软件版本只追加新的 Migration不修改已发布 Migration。 /// 初始数据库基线。后续软件版本只追加新的 Migration不修改已发布 Migration。

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SQLite namespace FileShare_EFCore.Migrations.SQLite
{ {
[DbContext(typeof(SqliteAppDataContext))] [DbContext(typeof(SqliteAppDataContext))]
[Migration("20260515072045_AutoMigration_20260515152037")] [Migration("20260515072045_AutoMigration_20260515152037")]
@ -20,7 +20,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.0"); modelBuilder.HasAnnotation("ProductVersion", "10.0.0");
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -65,7 +65,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -1,8 +1,8 @@
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SQLite namespace FileShare_EFCore.Migrations.SQLite
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AutoMigration_20260515152037 : Migration public partial class AutoMigration_20260515152037 : Migration

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SQLite namespace FileShare_EFCore.Migrations.SQLite
{ {
[DbContext(typeof(SqliteAppDataContext))] [DbContext(typeof(SqliteAppDataContext))]
[Migration("20260515085847_AutoMigration_20260515165835")] [Migration("20260515085847_AutoMigration_20260515165835")]
@ -20,7 +20,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.0"); modelBuilder.HasAnnotation("ProductVersion", "10.0.0");
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -80,7 +80,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -125,7 +125,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -1,9 +1,9 @@
using System; using System;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SQLite namespace FileShare_EFCore.Migrations.SQLite
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AutoMigration_20260515165835 : Migration public partial class AutoMigration_20260515165835 : Migration

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SQLite namespace FileShare_EFCore.Migrations.SQLite
{ {
[DbContext(typeof(SqliteAppDataContext))] [DbContext(typeof(SqliteAppDataContext))]
[Migration("20260520083230_AutoMigration_20260520163216")] [Migration("20260520083230_AutoMigration_20260520163216")]
@ -20,7 +20,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.7"); modelBuilder.HasAnnotation("ProductVersion", "10.0.7");
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -80,7 +80,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -131,7 +131,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -1,8 +1,8 @@
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SQLite namespace FileShare_EFCore.Migrations.SQLite
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AutoMigration_20260520163216 : Migration public partial class AutoMigration_20260520163216 : Migration

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SQLite namespace FileShare_EFCore.Migrations.SQLite
{ {
[DbContext(typeof(SqliteAppDataContext))] [DbContext(typeof(SqliteAppDataContext))]
[Migration("20260521080213_AddFileLibrary")] [Migration("20260521080213_AddFileLibrary")]
@ -20,7 +20,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.7"); modelBuilder.HasAnnotation("ProductVersion", "10.0.7");
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -80,7 +80,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.ManagedFileRecord", b => modelBuilder.Entity("FileShare_EFCore.Models.ManagedFileRecord", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -170,7 +170,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.ManagedLibraryRoot", b => modelBuilder.Entity("FileShare_EFCore.Models.ManagedLibraryRoot", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -237,7 +237,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -288,7 +288,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -331,9 +331,9 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.ManagedFileRecord", b => modelBuilder.Entity("FileShare_EFCore.Models.ManagedFileRecord", b =>
{ {
b.HasOne("Avalonia_EFCore.Models.ManagedLibraryRoot", "LibraryRoot") b.HasOne("FileShare_EFCore.Models.ManagedLibraryRoot", "LibraryRoot")
.WithMany("Files") .WithMany("Files")
.HasForeignKey("LibraryRootId") .HasForeignKey("LibraryRootId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -342,7 +342,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
b.Navigation("LibraryRoot"); b.Navigation("LibraryRoot");
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.ManagedLibraryRoot", b => modelBuilder.Entity("FileShare_EFCore.Models.ManagedLibraryRoot", b =>
{ {
b.Navigation("Files"); b.Navigation("Files");
}); });

View File

@ -1,9 +1,9 @@
using System; using System;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SQLite namespace FileShare_EFCore.Migrations.SQLite
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddFileLibrary : Migration public partial class AddFileLibrary : Migration

View File

@ -1,13 +1,13 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SQLite namespace FileShare_EFCore.Migrations.SQLite
{ {
[DbContext(typeof(SqliteAppDataContext))] [DbContext(typeof(SqliteAppDataContext))]
partial class SqliteAppDataContextModelSnapshot : ModelSnapshot partial class SqliteAppDataContextModelSnapshot : ModelSnapshot
@ -17,7 +17,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.7"); modelBuilder.HasAnnotation("ProductVersion", "10.0.7");
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -77,7 +77,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.ManagedFileRecord", b => modelBuilder.Entity("FileShare_EFCore.Models.ManagedFileRecord", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -167,7 +167,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.ManagedLibraryRoot", b => modelBuilder.Entity("FileShare_EFCore.Models.ManagedLibraryRoot", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -234,7 +234,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -285,7 +285,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -328,9 +328,9 @@ namespace Avalonia_EFCore.Migrations.SQLite
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.ManagedFileRecord", b => modelBuilder.Entity("FileShare_EFCore.Models.ManagedFileRecord", b =>
{ {
b.HasOne("Avalonia_EFCore.Models.ManagedLibraryRoot", "LibraryRoot") b.HasOne("FileShare_EFCore.Models.ManagedLibraryRoot", "LibraryRoot")
.WithMany("Files") .WithMany("Files")
.HasForeignKey("LibraryRootId") .HasForeignKey("LibraryRootId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
@ -339,7 +339,7 @@ namespace Avalonia_EFCore.Migrations.SQLite
b.Navigation("LibraryRoot"); b.Navigation("LibraryRoot");
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.ManagedLibraryRoot", b => modelBuilder.Entity("FileShare_EFCore.Models.ManagedLibraryRoot", b =>
{ {
b.Navigation("Files"); b.Navigation("Files");
}); });

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
@ -9,7 +9,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SqlServer namespace FileShare_EFCore.Migrations.SqlServer
{ {
[DbContext(typeof(SqlServerAppDataContext))] [DbContext(typeof(SqlServerAppDataContext))]
[Migration("20260520082607_AutoMigration_20260520162543")] [Migration("20260520082607_AutoMigration_20260520162543")]
@ -25,7 +25,7 @@ namespace Avalonia_EFCore.Migrations.SqlServer
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -87,7 +87,7 @@ namespace Avalonia_EFCore.Migrations.SqlServer
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -134,7 +134,7 @@ namespace Avalonia_EFCore.Migrations.SqlServer
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -1,9 +1,9 @@
using System; using System;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SqlServer namespace FileShare_EFCore.Migrations.SqlServer
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AutoMigration_20260520162543 : Migration public partial class AutoMigration_20260520162543 : Migration

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
@ -9,7 +9,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SqlServer namespace FileShare_EFCore.Migrations.SqlServer
{ {
[DbContext(typeof(SqlServerAppDataContext))] [DbContext(typeof(SqlServerAppDataContext))]
[Migration("20260520083242_AutoMigration_20260520163216")] [Migration("20260520083242_AutoMigration_20260520163216")]
@ -25,7 +25,7 @@ namespace Avalonia_EFCore.Migrations.SqlServer
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -87,7 +87,7 @@ namespace Avalonia_EFCore.Migrations.SqlServer
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -140,7 +140,7 @@ namespace Avalonia_EFCore.Migrations.SqlServer
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -1,8 +1,8 @@
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SqlServer namespace FileShare_EFCore.Migrations.SqlServer
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AutoMigration_20260520163216 : Migration public partial class AutoMigration_20260520163216 : Migration

View File

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable #nullable disable
namespace Avalonia_EFCore.Migrations.SqlServer namespace FileShare_EFCore.Migrations.SqlServer
{ {
[DbContext(typeof(SqlServerAppDataContext))] [DbContext(typeof(SqlServerAppDataContext))]
partial class SqlServerAppDataContextModelSnapshot : ModelSnapshot partial class SqlServerAppDataContextModelSnapshot : ModelSnapshot
@ -22,7 +22,7 @@ namespace Avalonia_EFCore.Migrations.SqlServer
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Avalonia_EFCore.Models.ApiRefreshTokenEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -84,7 +84,7 @@ namespace Avalonia_EFCore.Migrations.SqlServer
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.UserEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -137,7 +137,7 @@ namespace Avalonia_EFCore.Migrations.SqlServer
}); });
}); });
modelBuilder.Entity("Avalonia_EFCore.Models.WeatherForecastEntity", b => modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()

View File

@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace Avalonia_EFCore.Models namespace FileShare_EFCore.Models
{ {
/// <summary> /// <summary>
/// API refresh token。只保存哈希不保存明文 token。 /// API refresh token。只保存哈希不保存明文 token。

View File

@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace Avalonia_EFCore.Models namespace FileShare_EFCore.Models
{ {
/// <summary> /// <summary>
/// 扫描入库的可在线查看文件。 /// 扫描入库的可在线查看文件。

View File

@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace Avalonia_EFCore.Models namespace FileShare_EFCore.Models
{ {
/// <summary> /// <summary>
/// 管理端添加的文件库根目录或磁盘。 /// 管理端添加的文件库根目录或磁盘。

View File

@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace Avalonia_EFCore.Models namespace FileShare_EFCore.Models
{ {
/// <summary> /// <summary>
/// 用户实体 —— 演示数据库 CRUD 操作。 /// 用户实体 —— 演示数据库 CRUD 操作。

View File

@ -1,4 +1,4 @@
namespace Avalonia_EFCore.Models namespace FileShare_EFCore.Models
{ {
/// <summary> /// <summary>
/// 天气预报数据模型(内存/DTO 用,非数据库实体)。 /// 天气预报数据模型(内存/DTO 用,非数据库实体)。

View File

@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace Avalonia_EFCore.Models namespace FileShare_EFCore.Models
{ {
/// <summary> /// <summary>
/// 天气预报数据实体。 /// 天气预报数据实体。

View File

@ -1,7 +1,7 @@
<Application xmlns="https://github.com/avaloniaui" <Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Avalonia_PC.App" x:Class="FileShare_PC.App"
xmlns:local="using:Avalonia_PC" xmlns:local="using:FileShare_PC"
RequestedThemeVariant="Default"> RequestedThemeVariant="Default">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. --> <!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->

View File

@ -1,11 +1,11 @@
using Avalonia; using Avalonia;
using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml; using Avalonia.Markup.Xaml;
using Avalonia_PC.ViewModels; using FileShare_PC.ViewModels;
using Avalonia_PC.Views; using FileShare_PC.Views;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace Avalonia_PC namespace FileShare_PC
{ {
/// <summary> /// <summary>
/// Avalonia 应用程序入口类,负责初始化 XAML 资源和设置主窗口。 /// Avalonia 应用程序入口类,负责初始化 XAML 资源和设置主窗口。

View File

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

View File

@ -1,9 +1,9 @@
using Avalonia_Services.Services.AuthService; using FileShare_Services.Services.AuthService;
using System; using System;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Avalonia_PC.Authentication namespace FileShare_PC.Authentication
{ {
/// <summary> /// <summary>
/// 第三方授权客户端占位实现。接入真实第三方接口时替换此服务即可。 /// 第三方授权客户端占位实现。接入真实第三方接口时替换此服务即可。

View File

@ -1,11 +1,11 @@
using Authentication; using Authentication;
using Avalonia_Common.Core; using FileShare_Common.Core;
using Avalonia_Services.Core; using FileShare_Services.Core;
using Avalonia_Services.Services.AuthService; using FileShare_Services.Services.AuthService;
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Avalonia_PC.Authentication namespace FileShare_PC.Authentication
{ {
/// <summary> /// <summary>
/// PC 端鉴权端点服务,实现 <see cref="IPcAuthEndpointService"/> /// PC 端鉴权端点服务,实现 <see cref="IPcAuthEndpointService"/>

View File

@ -1,10 +1,10 @@
using Authentication; using Authentication;
using Avalonia_Services.Core; using FileShare_Services.Core;
using System; using System;
using System.Security.Claims; using System.Security.Claims;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Avalonia_PC.Authentication namespace FileShare_PC.Authentication
{ {
/// <summary> /// <summary>
/// PC 端鉴权服务,基于全局 Token 验证用户身份,实现 <see cref="IAuthService"/>。 /// PC 端鉴权服务,基于全局 Token 验证用户身份,实现 <see cref="IAuthService"/>。

View File

@ -1,4 +1,4 @@
using Avalonia_Services.Services.AuthService; using FileShare_Services.Services.AuthService;
using System; using System;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net10.0</TargetFramework> <TargetFramework>net10.0</TargetFramework>
@ -41,8 +41,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Avalonia-Services\Avalonia-Services.csproj" /> <ProjectReference Include="..\FileShare-Services\FileShare-Services.csproj" />
<ProjectReference Include="..\Avalonia-Common\Avalonia-Common.csproj" /> <ProjectReference Include="..\FileShare-Common\FileShare-Common.csproj" />
<ProjectReference Include="..\Avalonia-EFCore\Avalonia-EFCore.csproj" /> <ProjectReference Include="..\FileShare-EFCore\FileShare-EFCore.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor> <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ActiveDebugProfile>Avalonia-PC</ActiveDebugProfile> <ActiveDebugProfile>FileShare-PC</ActiveDebugProfile>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -0,0 +1,11 @@
<Solution>
<Project Path="../FileShare-API/FileShare-API.csproj" Id="e33aba9a-a56b-4f6b-8eaa-3acbed65ebad" />
<Project Path="../FileShare-Common/FileShare-Common.csproj" Id="caed4118-2161-4382-90b8-35fb4efe3b5f" />
<Project Path="../FileShare-EFCore/FileShare-EFCore.csproj" Id="64557501-62a7-4863-b2bf-1570b8c6fecb" />
<Project Path="../FileShare-Services/FileShare-Services.csproj" Id="b8757cf9-5422-4c67-acae-3c967c95f866" />
<Project Path="../FileShare-Web-VUE/fileshare-web-vue.esproj">
<Build />
<Deploy />
</Project>
<Project Path="FileShare-PC.csproj" />
</Solution>

View File

@ -1,19 +1,19 @@
using Authentication; using Authentication;
using Avalonia; using Avalonia;
using Avalonia_Common.Infrastructure; using FileShare_Common.Infrastructure;
using Avalonia_EFCore.Database; using FileShare_EFCore.Database;
using Avalonia_PC.Authentication; using FileShare_PC.Authentication;
using Avalonia_PC.Views; using FileShare_PC.Views;
using Avalonia_Services.Core; using FileShare_Services.Core;
using Avalonia_Services.Endpoints; using FileShare_Services.Endpoints;
using Avalonia_Services.Services; using FileShare_Services.Services;
using Avalonia_Services.Services.AuthService; using FileShare_Services.Services.AuthService;
using Avalonia_Services.Services.FileLibrary; using FileShare_Services.Services.FileLibrary;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Serilog; using Serilog;
using System; using System;
namespace Avalonia_PC namespace FileShare_PC
{ {
/// <summary> /// <summary>
/// 桌面应用程序入口类,负责配置 DI 容器、初始化数据库和启动 Avalonia 框架。 /// 桌面应用程序入口类,负责配置 DI 容器、初始化数据库和启动 Avalonia 框架。
@ -35,7 +35,7 @@ namespace Avalonia_PC
// 初始化日志系统 // 初始化日志系统
AppLog.Initialize(LoggingConfiguration.CreateDefaultLogger(logDir: "logs")); AppLog.Initialize(LoggingConfiguration.CreateDefaultLogger(logDir: "logs"));
AppLog.Information("Avalonia-PC 正在启动..."); AppLog.Information("FileShare-PC 正在启动...");
ConfigureServices(); ConfigureServices();

View File

@ -1,6 +1,6 @@
{ {
"profiles": { "profiles": {
"Avalonia-PC": { "FileShare-PC": {
"commandName": "Project" "commandName": "Project"
}, },
"WSL": { "WSL": {

View File

@ -1,10 +1,10 @@
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Controls.Templates; using Avalonia.Controls.Templates;
using Avalonia_PC.ViewModels; using FileShare_PC.ViewModels;
using System; using System;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Avalonia_PC namespace FileShare_PC
{ {
/// <summary> /// <summary>
/// Given a view model, returns the corresponding view if possible. /// Given a view model, returns the corresponding view if possible.

View File

@ -1,4 +1,4 @@
namespace Avalonia_PC.ViewModels namespace FileShare_PC.ViewModels
{ {
/// <summary> /// <summary>
/// 主窗口的 ViewModel提供问候语等绑定属性。 /// 主窗口的 ViewModel提供问候语等绑定属性。
@ -8,6 +8,6 @@
/// <summary> /// <summary>
/// 获取问候语文本。 /// 获取问候语文本。
/// </summary> /// </summary>
public string Greeting { get; } = "Welcome to Avalonia!"; public string Greeting { get; } = "Welcome to FileShare!";
} }
} }

View File

@ -1,6 +1,6 @@
using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel;
namespace Avalonia_PC.ViewModels namespace FileShare_PC.ViewModels
{ {
/// <summary> /// <summary>
/// ViewModel 基类,继承自 CommunityToolkit.Mvvm 的 ObservableObject /// ViewModel 基类,继承自 CommunityToolkit.Mvvm 的 ObservableObject

View File

@ -1,4 +1,4 @@
namespace Avalonia_PC.Views namespace FileShare_PC.Views
{ {
/// <summary> /// <summary>
/// MainWindow 的分部类,定义注入 WebView2 的 JavaScript Bridge 脚本。 /// MainWindow 的分部类,定义注入 WebView2 的 JavaScript Bridge 脚本。

View File

@ -1,13 +1,13 @@
using Avalonia_Services.Core; using FileShare_Services.Core;
using Avalonia_Services.Endpoints; using FileShare_Services.Endpoints;
using Avalonia_Services.Extensions; using FileShare_Services.Extensions;
using Avalonia_Services.Services; using FileShare_Services.Services;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Avalonia_PC.Views namespace FileShare_PC.Views
{ {
/// <summary> /// <summary>
/// MainWindow 的分部类,负责路由注册和统一端点适配。 /// MainWindow 的分部类,负责路由注册和统一端点适配。
@ -16,7 +16,7 @@ namespace Avalonia_PC.Views
{ {
/// <summary> /// <summary>
/// 统一端点适配器(替代原来的 _routes 字典)。 /// 统一端点适配器(替代原来的 _routes 字典)。
/// 所有端点在 Avalonia-Services/AppEndpoints.cs 中统一定义。 /// 所有端点在 FileShare-Services/AppEndpoints.cs 中统一定义。
/// </summary> /// </summary>
private DesktopEndpointAdapter _endpointAdapter = null!; private DesktopEndpointAdapter _endpointAdapter = null!;

View File

@ -2,13 +2,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:Avalonia_PC.ViewModels" xmlns:vm="using:FileShare_PC.ViewModels"
xmlns:webview="clr-namespace:Avalonia.Controls;assembly=Avalonia.Controls.WebView" xmlns:webview="clr-namespace:Avalonia.Controls;assembly=Avalonia.Controls.WebView"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Avalonia_PC.Views.MainWindow" x:Class="FileShare_PC.Views.MainWindow"
x:DataType="vm:MainWindowViewModel" x:DataType="vm:MainWindowViewModel"
Icon="/Assets/avalonia-logo.ico" Icon="/Assets/avalonia-logo.ico"
Title="Avalonia_PC"> Title="FileShare_PC">
<Design.DataContext> <Design.DataContext>
<!-- This only sets the DataContext for the previewer in an IDE, <!-- This only sets the DataContext for the previewer in an IDE,

View File

@ -9,10 +9,10 @@ using System.Reflection;
using System.Text.Json; using System.Text.Json;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Avalonia_Services.Services.FileLibrary; using FileShare_Services.Services.FileLibrary;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace Avalonia_PC.Views namespace FileShare_PC.Views
{ {
/// <summary> /// <summary>
/// 主窗口,承载 WebView2 控件并管理前后端 Bridge 通信。 /// 主窗口,承载 WebView2 控件并管理前后端 Bridge 通信。
@ -591,7 +591,7 @@ namespace Avalonia_PC.Views
} }
/// <summary> /// <summary>
/// Handle media element requests using the same stream path as Avalonia-API. /// Handle media element requests using the same stream path as FileShare-API.
/// </summary> /// </summary>
private async Task<bool> TryHandleLocalMediaStreamAsync(HttpListenerContext context) private async Task<bool> TryHandleLocalMediaStreamAsync(HttpListenerContext context)
{ {

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<!-- This manifest is used on Windows only. <!-- This manifest is used on Windows only.
Don't remove it as it might cause problems with window transparency and embedded controls. Don't remove it as it might cause problems with window transparency and embedded controls.
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests --> For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
<assemblyIdentity version="1.0.0.0" name="Avalonia_PC.Desktop"/> <assemblyIdentity version="1.0.0.0" name="FileShare_PC.Desktop"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application> <application>

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Linq; using System.Linq;
namespace Avalonia_Services.Core namespace FileShare_Services.Core
{ {
/// <summary> /// <summary>
/// 端点列表打印工具 —— 在应用启动时输出所有已注册的拦截接口。 /// 端点列表打印工具 —— 在应用启动时输出所有已注册的拦截接口。

View File

@ -1,4 +1,4 @@
namespace Avalonia_Services.Core namespace FileShare_Services.Core
{ {
/// <summary> /// <summary>
/// 文件流响应 —— 管道检测到此类型时将返回原始文件而非 JSON。 /// 文件流响应 —— 管道检测到此类型时将返回原始文件而非 JSON。

View File

@ -1,8 +1,8 @@
using Avalonia_Common.Core; using FileShare_Common.Core;
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Avalonia_Services.Core namespace FileShare_Services.Core
{ {
/// <summary> /// <summary>
/// 全局异常拦截过滤器 —— 自动包裹所有端点处理器,无需在每个方法中写 try-catch。 /// 全局异常拦截过滤器 —— 自动包裹所有端点处理器,无需在每个方法中写 try-catch。

View File

@ -1,6 +1,6 @@
using System.Security.Claims; using System.Security.Claims;
namespace Avalonia_Services.Core namespace FileShare_Services.Core
{ {
/// <summary> /// <summary>
/// 鉴权服务抽象 —— 各宿主按自己的方式实现JWT / Cookie / Token 等)。 /// 鉴权服务抽象 —— 各宿主按自己的方式实现JWT / Cookie / Token 等)。

View File

@ -1,6 +1,6 @@
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Avalonia_Services.Core namespace FileShare_Services.Core
{ {
/// <summary> /// <summary>
/// 端点过滤器抽象 —— 在请求处理前后执行逻辑。 /// 端点过滤器抽象 —— 在请求处理前后执行逻辑。

View File

@ -1,10 +1,10 @@
using Avalonia_Common.Core; using FileShare_Common.Core;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace Avalonia_Services.Core namespace FileShare_Services.Core
{ {
/// <summary> /// <summary>
/// 端点挂载的宿主目标。 /// 端点挂载的宿主目标。
@ -12,9 +12,9 @@ namespace Avalonia_Services.Core
[Flags] [Flags]
public enum EndpointHostTarget public enum EndpointHostTarget
{ {
/// <summary>挂载到 Avalonia-APIASP.NET Core Web API。</summary> /// <summary>挂载到 FileShare-APIASP.NET Core Web API。</summary>
Api = 1, Api = 1,
/// <summary>挂载到 Avalonia-PC桌面 WebView。</summary> /// <summary>挂载到 FileShare-PC桌面 WebView。</summary>
Pc = 2, Pc = 2,
/// <summary>同时挂载到 API 和 PC。</summary> /// <summary>同时挂载到 API 和 PC。</summary>
All = Api | Pc, All = Api | Pc,
@ -121,7 +121,7 @@ namespace Avalonia_Services.Core
} }
/// <summary> /// <summary>
/// 只挂载到 Avalonia-API。 /// 只挂载到 FileShare-API。
/// </summary> /// </summary>
public ServiceEndpoint ApiOnly() public ServiceEndpoint ApiOnly()
{ {
@ -130,7 +130,7 @@ namespace Avalonia_Services.Core
} }
/// <summary> /// <summary>
/// 只挂载到 Avalonia-PC。 /// 只挂载到 FileShare-PC。
/// </summary> /// </summary>
public ServiceEndpoint PcOnly() public ServiceEndpoint PcOnly()
{ {
@ -150,7 +150,7 @@ namespace Avalonia_Services.Core
} }
/// <summary> /// <summary>
/// 端点集合 —— 所有端点的注册中心。在 Avalonia-Services 中统一配置。 /// 端点集合 —— 所有端点的注册中心。在 FileShare-Services 中统一配置。
/// </summary> /// </summary>
public class ServiceEndpointCollection public class ServiceEndpointCollection
{ {

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace Avalonia_Services.Core namespace FileShare_Services.Core
{ {
/// <summary> /// <summary>
/// 抽象的请求上下文屏蔽不同宿主ASP.NET Core / Desktop WebView的差异。 /// 抽象的请求上下文屏蔽不同宿主ASP.NET Core / Desktop WebView的差异。

View File

@ -1,4 +1,4 @@
namespace Avalonia_Services.Core namespace FileShare_Services.Core
{ {
/// <summary> /// <summary>
/// Matches unified endpoint patterns and extracts simple route values. /// Matches unified endpoint patterns and extracts simple route values.

View File

@ -1,7 +1,7 @@
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Avalonia_Services.Core namespace FileShare_Services.Core
{ {
/// <summary> /// <summary>
/// Binds unified endpoint request models from JSON bodies or query parameters. /// Binds unified endpoint request models from JSON bodies or query parameters.

View File

@ -1,13 +1,13 @@
using Avalonia_Common.Core; using FileShare_Common.Core;
using Avalonia_Services.Core; using FileShare_Services.Core;
using Avalonia_Services.Services.FileLibrary; using FileShare_Services.Services.FileLibrary;
using Avalonia_Services.Services.QrCode; using FileShare_Services.Services.QrCode;
namespace Avalonia_Services.Endpoints namespace FileShare_Services.Endpoints
{ {
/// <summary> /// <summary>
/// 统一端点配置 —— 所有业务端点在此定义一次。 /// 统一端点配置 —— 所有业务端点在此定义一次。
/// 这是 Avalonia-API 和 Avalonia-PC 的唯一入口。 /// 这是 FileShare-API 和 FileShare-PC 的唯一入口。
/// </summary> /// </summary>
public static class AppEndpoints public static class AppEndpoints
{ {

View File

@ -1,7 +1,7 @@
using Avalonia_Services.Core; using FileShare_Services.Core;
using Avalonia_Services.Services.AuthService; using FileShare_Services.Services.AuthService;
namespace Avalonia_Services.Endpoints namespace FileShare_Services.Endpoints
{ {
/// <summary> /// <summary>
/// 认证端点统一入口。端点定义在这里,宿主项目只提供对应实现。 /// 认证端点统一入口。端点定义在这里,宿主项目只提供对应实现。

View File

@ -1,9 +1,9 @@
using Avalonia_Services.Core; using FileShare_Services.Core;
namespace Avalonia_Services.Extensions namespace FileShare_Services.Extensions
{ {
/// <summary> /// <summary>
/// Desktop (Avalonia-PC) 端点适配器。 /// Desktop (FileShare-PC) 端点适配器。
/// 将统一端点转换为桌面端可用的路由处理器,支持过滤器和鉴权管道。 /// 将统一端点转换为桌面端可用的路由处理器,支持过滤器和鉴权管道。
/// </summary> /// </summary>
public class DesktopEndpointAdapter public class DesktopEndpointAdapter

View File

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net10.0</TargetFramework> <TargetFramework>net10.0</TargetFramework>
<RootNamespace>Avalonia_Services</RootNamespace> <RootNamespace>FileShare_Services</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
@ -18,8 +18,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Avalonia-Common\Avalonia-Common.csproj" /> <ProjectReference Include="..\FileShare-Common\FileShare-Common.csproj" />
<ProjectReference Include="..\Avalonia-EFCore\Avalonia-EFCore.csproj" /> <ProjectReference Include="..\FileShare-EFCore\FileShare-EFCore.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,4 +1,4 @@
namespace Avalonia_Services.Services.AuthService namespace FileShare_Services.Services.AuthService
{ {
/// <summary> /// <summary>
/// API 登录请求。 /// API 登录请求。

View File

@ -1,8 +1,8 @@
using Avalonia_Common.Core; using FileShare_Common.Core;
using Avalonia_Services.Core; using FileShare_Services.Core;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Avalonia_Services.Services.AuthService namespace FileShare_Services.Services.AuthService
{ {
/// <summary> /// <summary>
/// API 鉴权端点服务接口,定义登录、刷新 Token 和登出操作。 /// API 鉴权端点服务接口,定义登录、刷新 Token 和登出操作。

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