[성현모] AccountDB Core로 이동

This commit is contained in:
SHM
2025-07-24 16:54:43 +09:00
parent c6fc5328df
commit bb9ed413a7
20 changed files with 151 additions and 173 deletions

View File

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
namespace SystemX.Core.DB;
public partial class AccountDBContext : DbContext
{
public AccountDBContext(DbContextOptions<AccountDBContext> options)
: base(options)
{
}
public virtual DbSet<tRefreshToken> tRefreshTokens { get; set; }
public virtual DbSet<tRole> tRoles { get; set; }
public virtual DbSet<tUser> tUsers { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<tRefreshToken>(entity =>
{
entity.HasKey(e => e.cAuid).HasName("PK__tRefresh__FBF08554C9ECDB70");
entity.ToTable("tRefreshToken");
entity.Property(e => e.cAuid).HasMaxLength(250);
entity.Property(e => e.cRefreshToken).HasMaxLength(1000);
});
modelBuilder.Entity<tRole>(entity =>
{
entity.HasKey(e => e.cAuid).HasName("PK__tRole__FBF0855413CC5A4E");
entity.ToTable("tRole");
entity.Property(e => e.cAuid).HasMaxLength(250);
entity.Property(e => e.cRoleName).HasMaxLength(20);
});
modelBuilder.Entity<tUser>(entity =>
{
entity.HasKey(e => e.cUserID).HasName("PK__tUser__A75DC19A4B18524F");
entity.ToTable("tUser");
entity.Property(e => e.cUserID).HasMaxLength(50);
entity.Property(e => e.cAuid).HasMaxLength(250);
entity.Property(e => e.cPasswordHashed).HasMaxLength(250);
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}

View File

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class tRefreshToken
{
public string cAuid { get; set; } = null!;
public string cRefreshToken { get; set; } = null!;
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class tRole
{
public string cAuid { get; set; } = null!;
public byte cRoleID { get; set; }
public string cRoleName { get; set; } = null!;
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class tUser
{
public string cUserID { get; set; } = null!;
public string cAuid { get; set; } = null!;
public string cPasswordHashed { get; set; } = null!;
public byte cState { get; set; }
public DateTime cCreateDateTime { get; set; }
public DateTime? cLastLoginDateTime { get; set; }
}

View File

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy /y $(ProjectDir)$(OutputPath)$(TargetName).dll $(SolutionDir)..\DLL\" />
</Target>
</Project>

View File

@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemX.Core", "SystemX.Cor
EndProject
Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "SystemX.DB.AccountDB", "SystemX.DB.AccountDB\SystemX.DB.AccountDB.sqlproj", "{B44C85FA-BD31-419F-8481-477E166A5753}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemX.Core.DB", "SystemX.Core.DB\SystemX.Core.DB.csproj", "{78647721-F9BD-4876-89D5-95A2A0F3ADA7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -23,6 +25,10 @@ Global
{B44C85FA-BD31-419F-8481-477E166A5753}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B44C85FA-BD31-419F-8481-477E166A5753}.Release|Any CPU.Build.0 = Release|Any CPU
{B44C85FA-BD31-419F-8481-477E166A5753}.Release|Any CPU.Deploy.0 = Release|Any CPU
{78647721-F9BD-4876-89D5-95A2A0F3ADA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78647721-F9BD-4876-89D5-95A2A0F3ADA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78647721-F9BD-4876-89D5-95A2A0F3ADA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78647721-F9BD-4876-89D5-95A2A0F3ADA7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE