diff --git a/.gitignore b/.gitignore index 07517c8..8d7dfe9 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,9 @@ obj/ project.lock.json project.fragment.lock.json artifacts/ +appsettings.Development.json +appsettings.Staging.json +appsettings.Production.json # React Native *.orig.* diff --git a/HelpingHand.sln b/HelpingHand.sln new file mode 100644 index 0000000..d8cfc22 --- /dev/null +++ b/HelpingHand.sln @@ -0,0 +1,42 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.2.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "apps", "apps", "{1787FE1D-075E-9E68-7218-25F1BD1BBEAB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "database", "database", "{F705D443-EAB5-B768-10AC-B11C88742C98}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpingHand.Db", "apps\database\HelpingHand.Db.csproj", "{13FA3BE4-1E3F-A186-77A1-150ABC99B57E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{BC2D172B-13BC-136C-CDB1-4B1A687208C4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpingHand.Api", "apps\api\HelpingHand.Api.csproj", "{5B4628A9-2C3B-2F4E-D005-D50856B5F42D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {13FA3BE4-1E3F-A186-77A1-150ABC99B57E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13FA3BE4-1E3F-A186-77A1-150ABC99B57E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13FA3BE4-1E3F-A186-77A1-150ABC99B57E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13FA3BE4-1E3F-A186-77A1-150ABC99B57E}.Release|Any CPU.Build.0 = Release|Any CPU + {5B4628A9-2C3B-2F4E-D005-D50856B5F42D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B4628A9-2C3B-2F4E-D005-D50856B5F42D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B4628A9-2C3B-2F4E-D005-D50856B5F42D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B4628A9-2C3B-2F4E-D005-D50856B5F42D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F705D443-EAB5-B768-10AC-B11C88742C98} = {1787FE1D-075E-9E68-7218-25F1BD1BBEAB} + {13FA3BE4-1E3F-A186-77A1-150ABC99B57E} = {F705D443-EAB5-B768-10AC-B11C88742C98} + {BC2D172B-13BC-136C-CDB1-4B1A687208C4} = {1787FE1D-075E-9E68-7218-25F1BD1BBEAB} + {5B4628A9-2C3B-2F4E-D005-D50856B5F42D} = {BC2D172B-13BC-136C-CDB1-4B1A687208C4} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4292AA31-1262-48BE-B5DB-0A67419072F9} + EndGlobalSection +EndGlobal diff --git a/apps/api/Data/AppDbContext.cs b/apps/api/Data/AppDbContext.cs deleted file mode 100644 index 496dfef..0000000 --- a/apps/api/Data/AppDbContext.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace HelpingHand.Api.Data; - -public class AppDbContext : DbContext -{ - public AppDbContext(DbContextOptions options) - : base(options) - { - } - - // Add DbSet<> for your entities when you create them, e.g.: - // public DbSet Loans => Set(); - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - } -} diff --git a/apps/api/HelpingHand.Api.csproj b/apps/api/HelpingHand.Api.csproj index 48a5c1c..92dd053 100644 --- a/apps/api/HelpingHand.Api.csproj +++ b/apps/api/HelpingHand.Api.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable HelpingHand.Api @@ -9,11 +9,14 @@ - + all - + + + + diff --git a/apps/api/Program.cs b/apps/api/Program.cs index 0e16b23..ca5abcc 100644 --- a/apps/api/Program.cs +++ b/apps/api/Program.cs @@ -7,8 +7,10 @@ builder.Services.AddSwaggerGen(); // PostgreSQL (connection string from appsettings per environment) -builder.Services.AddDbContext(options => - options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection"))); +builder.Services.AddDbContext(options => + options.UseNpgsql( + builder.Configuration.GetConnectionString("DefaultConnection"), + b => b.MigrationsAssembly("HelpingHand.Db"))); // CORS (origins from appsettings per environment) var corsOrigins = builder.Configuration.GetSection("Api:CorsOrigins").Get() ?? Array.Empty(); diff --git a/apps/api/appsettings.Development.example.json b/apps/api/appsettings.Development.example.json new file mode 100644 index 0000000..5b55200 --- /dev/null +++ b/apps/api/appsettings.Development.example.json @@ -0,0 +1,15 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "Microsoft.AspNetCore": "Information" + } + }, + "ConnectionStrings": { + "DefaultConnection": "Host=;Port=5432;Database=;Username=;Password=;Ssl Mode=Require;Trust Server Certificate=true;Include Error Detail=true" + }, + "Api": { + "BaseUrl": "https://localhost:7001", + "CorsOrigins": [ "http://localhost:3000", "http://localhost:8081" ] + } +} diff --git a/apps/database/AppDbContext.cs b/apps/database/AppDbContext.cs new file mode 100644 index 0000000..a871b48 --- /dev/null +++ b/apps/database/AppDbContext.cs @@ -0,0 +1,136 @@ +using HelpingHand.Db.Entities; +using Microsoft.EntityFrameworkCore; + +namespace HelpingHand.Db; + +public class AppDbContext : DbContext +{ + public AppDbContext(DbContextOptions options) : base(options) { } + + public DbSet Users => Set(); + public DbSet Roles => Set(); + public DbSet UserRoles => Set(); + public DbSet BorrowerProfiles => Set(); + public DbSet
Addresses => Set
(); + public DbSet ReferenceContacts => Set(); + public DbSet Documents => Set(); + public DbSet AdminProfiles => Set(); + public DbSet AuditLogs => Set(); + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.Entity(e => + { + e.HasKey(u => u.Id); + e.Property(u => u.Id).HasDefaultValueSql("gen_random_uuid()"); + e.HasIndex(u => u.Email).IsUnique(); + e.HasIndex(u => u.PhoneNumber).IsUnique(); + e.Property(u => u.IsActive).HasDefaultValue(true); + e.Property(u => u.CreatedAt).HasDefaultValueSql("now()"); + e.Property(u => u.UpdatedAt).HasDefaultValueSql("now()"); + }); + + modelBuilder.Entity(e => + { + e.HasKey(r => r.Id); + e.HasIndex(r => r.Name).IsUnique(); + }); + + modelBuilder.Entity(e => + { + e.HasKey(ur => new { ur.UserId, ur.RoleId }); + e.Property(ur => ur.AssignedAt).HasDefaultValueSql("now()"); + e.HasOne(ur => ur.User) + .WithMany(u => u.UserRoles) + .HasForeignKey(ur => ur.UserId) + .OnDelete(DeleteBehavior.Cascade); + e.HasOne(ur => ur.Role) + .WithMany(r => r.UserRoles) + .HasForeignKey(ur => ur.RoleId) + .OnDelete(DeleteBehavior.Cascade); + e.HasOne(ur => ur.AssignedByUser) + .WithMany() + .HasForeignKey(ur => ur.AssignedBy) + .OnDelete(DeleteBehavior.SetNull); + }); + + modelBuilder.Entity(e => + { + e.HasKey(b => b.Id); + e.Property(b => b.Id).HasDefaultValueSql("gen_random_uuid()"); + e.HasIndex(b => b.UserId).IsUnique(); + e.Property(b => b.MonthlyIncome).HasPrecision(15, 2); + e.Property(b => b.CreatedAt).HasDefaultValueSql("now()"); + e.Property(b => b.UpdatedAt).HasDefaultValueSql("now()"); + e.HasOne(b => b.User) + .WithOne(u => u.BorrowerProfile) + .HasForeignKey(b => b.UserId) + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity
(e => + { + e.HasKey(a => a.Id); + e.Property(a => a.Id).HasDefaultValueSql("gen_random_uuid()"); + e.Property(a => a.CreatedAt).HasDefaultValueSql("now()"); + e.HasOne(a => a.User) + .WithMany(u => u.Addresses) + .HasForeignKey(a => a.UserId) + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity(e => + { + e.HasKey(r => r.Id); + e.Property(r => r.Id).HasDefaultValueSql("gen_random_uuid()"); + e.Property(r => r.CreatedAt).HasDefaultValueSql("now()"); + e.HasOne(r => r.BorrowerProfile) + .WithMany(b => b.ReferenceContacts) + .HasForeignKey(r => r.BorrowerProfileId) + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity(e => + { + e.HasKey(d => d.Id); + e.Property(d => d.Id).HasDefaultValueSql("gen_random_uuid()"); + e.Property(d => d.Status).HasDefaultValue("Pending"); + e.Property(d => d.CreatedAt).HasDefaultValueSql("now()"); + e.HasOne(d => d.User) + .WithMany(u => u.Documents) + .HasForeignKey(d => d.UserId) + .OnDelete(DeleteBehavior.Cascade); + e.HasOne(d => d.VerifiedByUser) + .WithMany() + .HasForeignKey(d => d.VerifiedBy) + .OnDelete(DeleteBehavior.SetNull); + }); + + modelBuilder.Entity(e => + { + e.HasKey(a => a.Id); + e.Property(a => a.Id).HasDefaultValueSql("gen_random_uuid()"); + e.HasIndex(a => a.UserId).IsUnique(); + e.Property(a => a.CreatedAt).HasDefaultValueSql("now()"); + e.HasOne(a => a.User) + .WithOne(u => u.AdminProfile) + .HasForeignKey(a => a.UserId) + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity(e => + { + e.HasKey(a => a.Id); + e.Property(a => a.Id).HasDefaultValueSql("gen_random_uuid()"); + e.Property(a => a.CreatedAt).HasDefaultValueSql("now()"); + e.Property(a => a.OldValues).HasColumnType("jsonb"); + e.Property(a => a.NewValues).HasColumnType("jsonb"); + e.HasOne(a => a.User) + .WithMany() + .HasForeignKey(a => a.UserId) + .OnDelete(DeleteBehavior.Restrict); + }); + } +} diff --git a/apps/database/Entities/Address.cs b/apps/database/Entities/Address.cs new file mode 100644 index 0000000..690351b --- /dev/null +++ b/apps/database/Entities/Address.cs @@ -0,0 +1,17 @@ +namespace HelpingHand.Db.Entities; + +public class Address +{ + public Guid Id { get; set; } + public Guid UserId { get; set; } + public string Type { get; set; } = null!; // Home, Work, Permanent + public string Street { get; set; } = null!; + public string Barangay { get; set; } = null!; + public string City { get; set; } = null!; + public string Province { get; set; } = null!; + public string ZipCode { get; set; } = null!; + public bool IsPrimary { get; set; } + public DateTime CreatedAt { get; set; } + + public User User { get; set; } = null!; +} diff --git a/apps/database/Entities/AdminProfile.cs b/apps/database/Entities/AdminProfile.cs new file mode 100644 index 0000000..e86a6b5 --- /dev/null +++ b/apps/database/Entities/AdminProfile.cs @@ -0,0 +1,13 @@ +namespace HelpingHand.Db.Entities; + +public class AdminProfile +{ + public Guid Id { get; set; } + public Guid UserId { get; set; } + public string FirstName { get; set; } = null!; + public string LastName { get; set; } = null!; + public string? Department { get; set; } + public DateTime CreatedAt { get; set; } + + public User User { get; set; } = null!; +} diff --git a/apps/database/Entities/AuditLog.cs b/apps/database/Entities/AuditLog.cs new file mode 100644 index 0000000..691729e --- /dev/null +++ b/apps/database/Entities/AuditLog.cs @@ -0,0 +1,16 @@ +namespace HelpingHand.Db.Entities; + +public class AuditLog +{ + public Guid Id { get; set; } + public Guid UserId { get; set; } + public string Action { get; set; } = null!; + public string EntityType { get; set; } = null!; + public Guid? EntityId { get; set; } + public string? OldValues { get; set; } // jsonb + public string? NewValues { get; set; } // jsonb + public string? IpAddress { get; set; } + public DateTime CreatedAt { get; set; } + + public User User { get; set; } = null!; +} diff --git a/apps/database/Entities/BorrowerProfile.cs b/apps/database/Entities/BorrowerProfile.cs new file mode 100644 index 0000000..1f12dc8 --- /dev/null +++ b/apps/database/Entities/BorrowerProfile.cs @@ -0,0 +1,25 @@ +namespace HelpingHand.Db.Entities; + +public class BorrowerProfile +{ + public Guid Id { get; set; } + public Guid UserId { get; set; } + public string FirstName { get; set; } = null!; + public string LastName { get; set; } = null!; + public string? MiddleName { get; set; } + public DateOnly DateOfBirth { get; set; } + public string Gender { get; set; } = null!; + public string CivilStatus { get; set; } = null!; + public string Nationality { get; set; } = null!; + public string NationalIdType { get; set; } = null!; + public string NationalIdNumber { get; set; } = null!; + public string EmploymentStatus { get; set; } = null!; + public string? EmployerName { get; set; } + public decimal MonthlyIncome { get; set; } + public string? ProfilePhotoUrl { get; set; } + public DateTime CreatedAt { get; set; } + public DateTime UpdatedAt { get; set; } + + public User User { get; set; } = null!; + public ICollection ReferenceContacts { get; set; } = []; +} diff --git a/apps/database/Entities/Document.cs b/apps/database/Entities/Document.cs new file mode 100644 index 0000000..81c2780 --- /dev/null +++ b/apps/database/Entities/Document.cs @@ -0,0 +1,17 @@ +namespace HelpingHand.Db.Entities; + +public class Document +{ + public Guid Id { get; set; } + public Guid UserId { get; set; } + public string Type { get; set; } = null!; // GovernmentId, ProofOfIncome, ProofOfBilling, Selfie + public string FileUrl { get; set; } = null!; + public string Status { get; set; } = "Pending"; // Pending, Verified, Rejected + public Guid? VerifiedBy { get; set; } + public DateTime? VerifiedAt { get; set; } + public string? RejectionReason { get; set; } + public DateTime CreatedAt { get; set; } + + public User User { get; set; } = null!; + public User? VerifiedByUser { get; set; } +} diff --git a/apps/database/Entities/ReferenceContact.cs b/apps/database/Entities/ReferenceContact.cs new file mode 100644 index 0000000..4c7f41b --- /dev/null +++ b/apps/database/Entities/ReferenceContact.cs @@ -0,0 +1,14 @@ +namespace HelpingHand.Db.Entities; + +public class ReferenceContact +{ + public Guid Id { get; set; } + public Guid BorrowerProfileId { get; set; } + public string FullName { get; set; } = null!; + public string Relationship { get; set; } = null!; + public string PhoneNumber { get; set; } = null!; + public string? Email { get; set; } + public DateTime CreatedAt { get; set; } + + public BorrowerProfile BorrowerProfile { get; set; } = null!; +} diff --git a/apps/database/Entities/Role.cs b/apps/database/Entities/Role.cs new file mode 100644 index 0000000..bbc859b --- /dev/null +++ b/apps/database/Entities/Role.cs @@ -0,0 +1,10 @@ +namespace HelpingHand.Db.Entities; + +public class Role +{ + public short Id { get; set; } + public string Name { get; set; } = null!; + public string? Description { get; set; } + + public ICollection UserRoles { get; set; } = []; +} diff --git a/apps/database/Entities/User.cs b/apps/database/Entities/User.cs new file mode 100644 index 0000000..aa792c9 --- /dev/null +++ b/apps/database/Entities/User.cs @@ -0,0 +1,22 @@ +namespace HelpingHand.Db.Entities; + +public class User +{ + public Guid Id { get; set; } + public string Email { get; set; } = null!; + public string PasswordHash { get; set; } = null!; + public string PhoneNumber { get; set; } = null!; + public bool IsActive { get; set; } = true; + public DateTime? EmailVerifiedAt { get; set; } + public DateTime? PhoneVerifiedAt { get; set; } + public DateTime? LastLoginAt { get; set; } + public DateTime CreatedAt { get; set; } + public DateTime UpdatedAt { get; set; } + + // Navigation + public ICollection UserRoles { get; set; } = []; + public BorrowerProfile? BorrowerProfile { get; set; } + public AdminProfile? AdminProfile { get; set; } + public ICollection
Addresses { get; set; } = []; + public ICollection Documents { get; set; } = []; +} diff --git a/apps/database/Entities/UserRole.cs b/apps/database/Entities/UserRole.cs new file mode 100644 index 0000000..711c4d7 --- /dev/null +++ b/apps/database/Entities/UserRole.cs @@ -0,0 +1,13 @@ +namespace HelpingHand.Db.Entities; + +public class UserRole +{ + public Guid UserId { get; set; } + public short RoleId { get; set; } + public Guid? AssignedBy { get; set; } + public DateTime AssignedAt { get; set; } + + public User User { get; set; } = null!; + public Role Role { get; set; } = null!; + public User? AssignedByUser { get; set; } +} diff --git a/apps/database/HelpingHand.Db.csproj b/apps/database/HelpingHand.Db.csproj new file mode 100644 index 0000000..b86150e --- /dev/null +++ b/apps/database/HelpingHand.Db.csproj @@ -0,0 +1,19 @@ + + + + net10.0 + enable + enable + HelpingHand.Db + HelpingHand.Db + + + + + + all + + + + + diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.Build.Locator.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.Build.Locator.dll" new file mode 100755 index 0000000..13b1021 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.Build.Locator.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe" new file mode 100755 index 0000000..00dd99f Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe.config" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe.config" new file mode 100755 index 0000000..f52998b --- /dev/null +++ "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe.config" @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.IO.Redist.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.IO.Redist.dll" new file mode 100755 index 0000000..88e63d8 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/Microsoft.IO.Redist.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/Newtonsoft.Json.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/Newtonsoft.Json.dll" new file mode 100755 index 0000000..1d035d6 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/Newtonsoft.Json.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Buffers.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Buffers.dll" new file mode 100755 index 0000000..f2d83c5 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Buffers.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Collections.Immutable.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Collections.Immutable.dll" new file mode 100755 index 0000000..7594b2e Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Collections.Immutable.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.CommandLine.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.CommandLine.dll" new file mode 100755 index 0000000..d0bbad5 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.CommandLine.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Memory.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Memory.dll" new file mode 100755 index 0000000..4617199 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Memory.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Numerics.Vectors.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Numerics.Vectors.dll" new file mode 100755 index 0000000..0865972 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Numerics.Vectors.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Runtime.CompilerServices.Unsafe.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Runtime.CompilerServices.Unsafe.dll" new file mode 100755 index 0000000..c5ba4e4 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Runtime.CompilerServices.Unsafe.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Threading.Tasks.Extensions.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Threading.Tasks.Extensions.dll" new file mode 100755 index 0000000..eeec928 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/System.Threading.Tasks.Extensions.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/cs/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/cs/System.CommandLine.resources.dll" new file mode 100755 index 0000000..0be3757 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/cs/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/de/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/de/System.CommandLine.resources.dll" new file mode 100755 index 0000000..bfed293 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/de/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/es/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/es/System.CommandLine.resources.dll" new file mode 100755 index 0000000..5e1c416 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/es/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/fr/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/fr/System.CommandLine.resources.dll" new file mode 100755 index 0000000..2916bdf Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/fr/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/it/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/it/System.CommandLine.resources.dll" new file mode 100755 index 0000000..1a55c94 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/it/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/ja/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/ja/System.CommandLine.resources.dll" new file mode 100755 index 0000000..c1be153 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/ja/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/ko/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/ko/System.CommandLine.resources.dll" new file mode 100755 index 0000000..bfcbbc6 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/ko/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/pl/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/pl/System.CommandLine.resources.dll" new file mode 100755 index 0000000..b9efaec Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/pl/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/pt-BR/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/pt-BR/System.CommandLine.resources.dll" new file mode 100755 index 0000000..69612cb Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/pt-BR/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/ru/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/ru/System.CommandLine.resources.dll" new file mode 100755 index 0000000..042aaf8 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/ru/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/tr/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/tr/System.CommandLine.resources.dll" new file mode 100755 index 0000000..629b98b Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/tr/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/zh-Hans/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/zh-Hans/System.CommandLine.resources.dll" new file mode 100755 index 0000000..ff8dacb Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/zh-Hans/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-net472/zh-Hant/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/zh-Hant/System.CommandLine.resources.dll" new file mode 100755 index 0000000..9b9870a Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-net472/zh-Hant/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.Build.Locator.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.Build.Locator.dll" new file mode 100755 index 0000000..cafcf21 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.Build.Locator.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.deps.json" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.deps.json" new file mode 100755 index 0000000..ed7fe7a --- /dev/null +++ "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.deps.json" @@ -0,0 +1,260 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v6.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v6.0": { + "Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost/4.14.0-3.25262.10": { + "dependencies": { + "Microsoft.Build.Locator": "1.6.10", + "Microsoft.CodeAnalysis.NetAnalyzers": "8.0.0-preview.23468.1", + "Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers": "3.3.4-beta1.22504.1", + "Microsoft.DotNet.XliffTasks": "9.0.0-beta.25255.5", + "Microsoft.VisualStudio.Threading.Analyzers": "17.13.2", + "Newtonsoft.Json": "13.0.3", + "Roslyn.Diagnostics.Analyzers": "3.11.0-beta1.24081.1", + "System.Collections.Immutable": "9.0.0", + "System.CommandLine": "2.0.0-beta4.24528.1" + }, + "runtime": { + "Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll": {} + }, + "resources": { + "cs/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "cs" + }, + "de/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "de" + }, + "es/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "es" + }, + "fr/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "fr" + }, + "it/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "it" + }, + "ja/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "ja" + }, + "ko/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "ko" + }, + "pl/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "pl" + }, + "pt-BR/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "pt-BR" + }, + "ru/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "ru" + }, + "tr/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "tr" + }, + "zh-Hans/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "zh-Hans" + }, + "zh-Hant/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.resources.dll": { + "locale": "zh-Hant" + } + } + }, + "Microsoft.Build.Locator/1.6.10": { + "runtime": { + "lib/net6.0/Microsoft.Build.Locator.dll": { + "assemblyVersion": "1.0.0.0", + "fileVersion": "1.6.10.57384" + } + } + }, + "Microsoft.CodeAnalysis.BannedApiAnalyzers/3.11.0-beta1.24081.1": {}, + "Microsoft.CodeAnalysis.NetAnalyzers/8.0.0-preview.23468.1": {}, + "Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers/3.3.4-beta1.22504.1": {}, + "Microsoft.CodeAnalysis.PublicApiAnalyzers/3.11.0-beta1.24081.1": {}, + "Microsoft.DotNet.XliffTasks/9.0.0-beta.25255.5": {}, + "Microsoft.VisualStudio.Threading.Analyzers/17.13.2": {}, + "Newtonsoft.Json/13.0.3": { + "runtime": { + "lib/net6.0/Newtonsoft.Json.dll": { + "assemblyVersion": "13.0.0.0", + "fileVersion": "13.0.3.27908" + } + } + }, + "Roslyn.Diagnostics.Analyzers/3.11.0-beta1.24081.1": { + "dependencies": { + "Microsoft.CodeAnalysis.BannedApiAnalyzers": "3.11.0-beta1.24081.1", + "Microsoft.CodeAnalysis.PublicApiAnalyzers": "3.11.0-beta1.24081.1" + } + }, + "System.Collections.Immutable/9.0.0": { + "dependencies": { + "System.Memory": "4.5.5", + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + }, + "runtime": { + "lib/netstandard2.0/System.Collections.Immutable.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.24.52809" + } + } + }, + "System.CommandLine/2.0.0-beta4.24528.1": { + "dependencies": { + "System.Memory": "4.5.5" + }, + "runtime": { + "lib/netstandard2.0/System.CommandLine.dll": { + "assemblyVersion": "2.0.0.0", + "fileVersion": "2.0.24.52801" + } + }, + "resources": { + "lib/netstandard2.0/cs/System.CommandLine.resources.dll": { + "locale": "cs" + }, + "lib/netstandard2.0/de/System.CommandLine.resources.dll": { + "locale": "de" + }, + "lib/netstandard2.0/es/System.CommandLine.resources.dll": { + "locale": "es" + }, + "lib/netstandard2.0/fr/System.CommandLine.resources.dll": { + "locale": "fr" + }, + "lib/netstandard2.0/it/System.CommandLine.resources.dll": { + "locale": "it" + }, + "lib/netstandard2.0/ja/System.CommandLine.resources.dll": { + "locale": "ja" + }, + "lib/netstandard2.0/ko/System.CommandLine.resources.dll": { + "locale": "ko" + }, + "lib/netstandard2.0/pl/System.CommandLine.resources.dll": { + "locale": "pl" + }, + "lib/netstandard2.0/pt-BR/System.CommandLine.resources.dll": { + "locale": "pt-BR" + }, + "lib/netstandard2.0/ru/System.CommandLine.resources.dll": { + "locale": "ru" + }, + "lib/netstandard2.0/tr/System.CommandLine.resources.dll": { + "locale": "tr" + }, + "lib/netstandard2.0/zh-Hans/System.CommandLine.resources.dll": { + "locale": "zh-Hans" + }, + "lib/netstandard2.0/zh-Hant/System.CommandLine.resources.dll": { + "locale": "zh-Hant" + } + } + }, + "System.Memory/4.5.5": {}, + "System.Runtime.CompilerServices.Unsafe/6.0.0": {} + } + }, + "libraries": { + "Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost/4.14.0-3.25262.10": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Microsoft.Build.Locator/1.6.10": { + "type": "package", + "serviceable": true, + "sha512": "sha512-DJhCkTGqy1LMJzEmG/2qxRTMHwdPc3WdVoGQI5o5mKHVo4dsHrCMLIyruwU/NSvPNSdvONlaf7jdFXnAMuxAuA==", + "path": "microsoft.build.locator/1.6.10", + "hashPath": "microsoft.build.locator.1.6.10.nupkg.sha512" + }, + "Microsoft.CodeAnalysis.BannedApiAnalyzers/3.11.0-beta1.24081.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-DH6L3rsbjppLrHM2l2/NKbnMaYd0NFHx2pjZaFdrVcRkONrV3i9FHv6Id8Dp6/TmjhXQsJVJJFbhhjkpuP1xxg==", + "path": "microsoft.codeanalysis.bannedapianalyzers/3.11.0-beta1.24081.1", + "hashPath": "microsoft.codeanalysis.bannedapianalyzers.3.11.0-beta1.24081.1.nupkg.sha512" + }, + "Microsoft.CodeAnalysis.NetAnalyzers/8.0.0-preview.23468.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-ZhIvyxmUCqb8OiU/VQfxfuAmIB4lQsjqhMVYKeoyxzSI+d7uR5Pzx3ZKoaIhPizQ15wa4lnyD6wg3TnSJ6P4LA==", + "path": "microsoft.codeanalysis.netanalyzers/8.0.0-preview.23468.1", + "hashPath": "microsoft.codeanalysis.netanalyzers.8.0.0-preview.23468.1.nupkg.sha512" + }, + "Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers/3.3.4-beta1.22504.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-2XRlqPAzVke7Sb80+UqaC7o57OwfK+tIr+aIOxrx41RWDMeR2SBUW7kL4sd6hfLFfBNsLo3W5PT+UwfvwPaOzA==", + "path": "microsoft.codeanalysis.performancesensitiveanalyzers/3.3.4-beta1.22504.1", + "hashPath": "microsoft.codeanalysis.performancesensitiveanalyzers.3.3.4-beta1.22504.1.nupkg.sha512" + }, + "Microsoft.CodeAnalysis.PublicApiAnalyzers/3.11.0-beta1.24081.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3bYGBihvoNO0rhCOG1U9O50/4Q8suZ+glHqQLIAcKvnodSnSW+dYWYzTNb1UbS8pUS8nAUfxSFMwuMup/G5DtQ==", + "path": "microsoft.codeanalysis.publicapianalyzers/3.11.0-beta1.24081.1", + "hashPath": "microsoft.codeanalysis.publicapianalyzers.3.11.0-beta1.24081.1.nupkg.sha512" + }, + "Microsoft.DotNet.XliffTasks/9.0.0-beta.25255.5": { + "type": "package", + "serviceable": true, + "sha512": "sha512-bb0fZB5ViPscdfYeWlmtyXJMzNkgcpkV5RWmXktfV9lwIUZgNZmFotUXrdcTyZzrN7v1tQK/Y6BGnbkP9gEsXg==", + "path": "microsoft.dotnet.xlifftasks/9.0.0-beta.25255.5", + "hashPath": "microsoft.dotnet.xlifftasks.9.0.0-beta.25255.5.nupkg.sha512" + }, + "Microsoft.VisualStudio.Threading.Analyzers/17.13.2": { + "type": "package", + "serviceable": true, + "sha512": "sha512-Qcd8IlaTXZVq3wolBnzby1P7kWihdWaExtD8riumiKuG1sHa8EgjV/o70TMjTaeUMhomBbhfdC9OPwAHoZfnjQ==", + "path": "microsoft.visualstudio.threading.analyzers/17.13.2", + "hashPath": "microsoft.visualstudio.threading.analyzers.17.13.2.nupkg.sha512" + }, + "Newtonsoft.Json/13.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==", + "path": "newtonsoft.json/13.0.3", + "hashPath": "newtonsoft.json.13.0.3.nupkg.sha512" + }, + "Roslyn.Diagnostics.Analyzers/3.11.0-beta1.24081.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-reHqZCDKifA+DURcL8jUfYkMGL4FpgNt5LI0uWTS6IpM8kKVbu/kO8byZsqfhBu4wUzT3MBDcoMfzhZPdENIpg==", + "path": "roslyn.diagnostics.analyzers/3.11.0-beta1.24081.1", + "hashPath": "roslyn.diagnostics.analyzers.3.11.0-beta1.24081.1.nupkg.sha512" + }, + "System.Collections.Immutable/9.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==", + "path": "system.collections.immutable/9.0.0", + "hashPath": "system.collections.immutable.9.0.0.nupkg.sha512" + }, + "System.CommandLine/2.0.0-beta4.24528.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-Xt8tsSU8yd0ZpbT9gl5DAwkMYWLo8PV1fq2R/belrUbHVVOIKqhLfbWksbdknUDpmzMHZenBtD6AGAp9uJTa2w==", + "path": "system.commandline/2.0.0-beta4.24528.1", + "hashPath": "system.commandline.2.0.0-beta4.24528.1.nupkg.sha512" + }, + "System.Memory/4.5.5": { + "type": "package", + "serviceable": true, + "sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", + "path": "system.memory/4.5.5", + "hashPath": "system.memory.4.5.5.nupkg.sha512" + }, + "System.Runtime.CompilerServices.Unsafe/6.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==", + "path": "system.runtime.compilerservices.unsafe/6.0.0", + "hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512" + } + } +} \ No newline at end of file diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll" new file mode 100755 index 0000000..993b54f Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll.config" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll.config" new file mode 100755 index 0000000..27bdea7 --- /dev/null +++ "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll.config" @@ -0,0 +1,605 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.runtimeconfig.json" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.runtimeconfig.json" new file mode 100755 index 0000000..3a5998a --- /dev/null +++ "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.runtimeconfig.json" @@ -0,0 +1,13 @@ +{ + "runtimeOptions": { + "tfm": "net6.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "6.0.0" + }, + "rollForward": "Major", + "configProperties": { + "System.Reflection.Metadata.MetadataUpdater.IsSupported": false + } + } +} \ No newline at end of file diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Newtonsoft.Json.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Newtonsoft.Json.dll" new file mode 100755 index 0000000..87bf9aa Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/Newtonsoft.Json.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/System.Collections.Immutable.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/System.Collections.Immutable.dll" new file mode 100755 index 0000000..b182127 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/System.Collections.Immutable.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/System.CommandLine.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/System.CommandLine.dll" new file mode 100755 index 0000000..d0bbad5 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/System.CommandLine.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/cs/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/cs/System.CommandLine.resources.dll" new file mode 100755 index 0000000..0be3757 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/cs/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/de/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/de/System.CommandLine.resources.dll" new file mode 100755 index 0000000..bfed293 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/de/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/es/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/es/System.CommandLine.resources.dll" new file mode 100755 index 0000000..5e1c416 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/es/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/fr/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/fr/System.CommandLine.resources.dll" new file mode 100755 index 0000000..2916bdf Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/fr/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/it/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/it/System.CommandLine.resources.dll" new file mode 100755 index 0000000..1a55c94 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/it/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/ja/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/ja/System.CommandLine.resources.dll" new file mode 100755 index 0000000..c1be153 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/ja/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/ko/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/ko/System.CommandLine.resources.dll" new file mode 100755 index 0000000..bfcbbc6 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/ko/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/pl/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/pl/System.CommandLine.resources.dll" new file mode 100755 index 0000000..b9efaec Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/pl/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/pt-BR/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/pt-BR/System.CommandLine.resources.dll" new file mode 100755 index 0000000..69612cb Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/pt-BR/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/ru/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/ru/System.CommandLine.resources.dll" new file mode 100755 index 0000000..042aaf8 Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/ru/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/tr/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/tr/System.CommandLine.resources.dll" new file mode 100755 index 0000000..629b98b Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/tr/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/zh-Hans/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/zh-Hans/System.CommandLine.resources.dll" new file mode 100755 index 0000000..ff8dacb Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/zh-Hans/System.CommandLine.resources.dll" differ diff --git "a/apps/database/bin\\Debug/net10.0/BuildHost-netcore/zh-Hant/System.CommandLine.resources.dll" "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/zh-Hant/System.CommandLine.resources.dll" new file mode 100755 index 0000000..9b9870a Binary files /dev/null and "b/apps/database/bin\\Debug/net10.0/BuildHost-netcore/zh-Hant/System.CommandLine.resources.dll" differ diff --git a/apps/database/migrations/20260228225159_InitialCreate.Designer.cs b/apps/database/migrations/20260228225159_InitialCreate.Designer.cs new file mode 100644 index 0000000..4228aea --- /dev/null +++ b/apps/database/migrations/20260228225159_InitialCreate.Designer.cs @@ -0,0 +1,539 @@ +// +using System; +using HelpingHand.Db; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace HelpingHand.Db.migrations +{ + [DbContext(typeof(AppDbContext))] + [Migration("20260228225159_InitialCreate")] + partial class InitialCreate + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("HelpingHand.Db.Entities.Address", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("Barangay") + .IsRequired() + .HasColumnType("text"); + + b.Property("City") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("IsPrimary") + .HasColumnType("boolean"); + + b.Property("Province") + .IsRequired() + .HasColumnType("text"); + + b.Property("Street") + .IsRequired() + .HasColumnType("text"); + + b.Property("Type") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("ZipCode") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Addresses"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.AdminProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("Department") + .HasColumnType("text"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("text"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("AdminProfiles"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("Action") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("EntityId") + .HasColumnType("uuid"); + + b.Property("EntityType") + .IsRequired() + .HasColumnType("text"); + + b.Property("IpAddress") + .HasColumnType("text"); + + b.Property("NewValues") + .HasColumnType("jsonb"); + + b.Property("OldValues") + .HasColumnType("jsonb"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AuditLogs"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.BorrowerProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("CivilStatus") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("DateOfBirth") + .HasColumnType("date"); + + b.Property("EmployerName") + .HasColumnType("text"); + + b.Property("EmploymentStatus") + .IsRequired() + .HasColumnType("text"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("text"); + + b.Property("Gender") + .IsRequired() + .HasColumnType("text"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("text"); + + b.Property("MiddleName") + .HasColumnType("text"); + + b.Property("MonthlyIncome") + .HasPrecision(15, 2) + .HasColumnType("numeric(15,2)"); + + b.Property("NationalIdNumber") + .IsRequired() + .HasColumnType("text"); + + b.Property("NationalIdType") + .IsRequired() + .HasColumnType("text"); + + b.Property("Nationality") + .IsRequired() + .HasColumnType("text"); + + b.Property("ProfilePhotoUrl") + .HasColumnType("text"); + + b.Property("UpdatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("BorrowerProfiles"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.Document", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("FileUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("RejectionReason") + .HasColumnType("text"); + + b.Property("Status") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasDefaultValue("Pending"); + + b.Property("Type") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("VerifiedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("VerifiedBy") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.HasIndex("VerifiedBy"); + + b.ToTable("Documents"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.ReferenceContact", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("BorrowerProfileId") + .HasColumnType("uuid"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("Email") + .HasColumnType("text"); + + b.Property("FullName") + .IsRequired() + .HasColumnType("text"); + + b.Property("PhoneNumber") + .IsRequired() + .HasColumnType("text"); + + b.Property("Relationship") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("BorrowerProfileId"); + + b.ToTable("ReferenceContacts"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.Role", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("smallint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Roles"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("Email") + .IsRequired() + .HasColumnType("text"); + + b.Property("EmailVerifiedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true); + + b.Property("LastLoginAt") + .HasColumnType("timestamp with time zone"); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("text"); + + b.Property("PhoneNumber") + .IsRequired() + .HasColumnType("text"); + + b.Property("PhoneVerifiedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("UpdatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.HasKey("Id"); + + b.HasIndex("Email") + .IsUnique(); + + b.HasIndex("PhoneNumber") + .IsUnique(); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.UserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("smallint"); + + b.Property("AssignedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("AssignedBy") + .HasColumnType("uuid"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("AssignedBy"); + + b.HasIndex("RoleId"); + + b.ToTable("UserRoles"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.Address", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithMany("Addresses") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.AdminProfile", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithOne("AdminProfile") + .HasForeignKey("HelpingHand.Db.Entities.AdminProfile", "UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.AuditLog", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.BorrowerProfile", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithOne("BorrowerProfile") + .HasForeignKey("HelpingHand.Db.Entities.BorrowerProfile", "UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.Document", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithMany("Documents") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("HelpingHand.Db.Entities.User", "VerifiedByUser") + .WithMany() + .HasForeignKey("VerifiedBy") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + + b.Navigation("VerifiedByUser"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.ReferenceContact", b => + { + b.HasOne("HelpingHand.Db.Entities.BorrowerProfile", "BorrowerProfile") + .WithMany("ReferenceContacts") + .HasForeignKey("BorrowerProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BorrowerProfile"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.UserRole", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "AssignedByUser") + .WithMany() + .HasForeignKey("AssignedBy") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("HelpingHand.Db.Entities.Role", "Role") + .WithMany("UserRoles") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithMany("UserRoles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AssignedByUser"); + + b.Navigation("Role"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.BorrowerProfile", b => + { + b.Navigation("ReferenceContacts"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.Role", b => + { + b.Navigation("UserRoles"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.User", b => + { + b.Navigation("Addresses"); + + b.Navigation("AdminProfile"); + + b.Navigation("BorrowerProfile"); + + b.Navigation("Documents"); + + b.Navigation("UserRoles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/apps/database/migrations/20260228225159_InitialCreate.cs b/apps/database/migrations/20260228225159_InitialCreate.cs new file mode 100644 index 0000000..5649a90 --- /dev/null +++ b/apps/database/migrations/20260228225159_InitialCreate.cs @@ -0,0 +1,338 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace HelpingHand.Db.migrations +{ + /// + public partial class InitialCreate : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Roles", + columns: table => new + { + Id = table.Column(type: "smallint", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + Name = table.Column(type: "text", nullable: false), + Description = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Roles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Users", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false, defaultValueSql: "gen_random_uuid()"), + Email = table.Column(type: "text", nullable: false), + PasswordHash = table.Column(type: "text", nullable: false), + PhoneNumber = table.Column(type: "text", nullable: false), + IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true), + EmailVerifiedAt = table.Column(type: "timestamp with time zone", nullable: true), + PhoneVerifiedAt = table.Column(type: "timestamp with time zone", nullable: true), + LastLoginAt = table.Column(type: "timestamp with time zone", nullable: true), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()"), + UpdatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()") + }, + constraints: table => + { + table.PrimaryKey("PK_Users", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Addresses", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false, defaultValueSql: "gen_random_uuid()"), + UserId = table.Column(type: "uuid", nullable: false), + Type = table.Column(type: "text", nullable: false), + Street = table.Column(type: "text", nullable: false), + Barangay = table.Column(type: "text", nullable: false), + City = table.Column(type: "text", nullable: false), + Province = table.Column(type: "text", nullable: false), + ZipCode = table.Column(type: "text", nullable: false), + IsPrimary = table.Column(type: "boolean", nullable: false), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()") + }, + constraints: table => + { + table.PrimaryKey("PK_Addresses", x => x.Id); + table.ForeignKey( + name: "FK_Addresses_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AdminProfiles", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false, defaultValueSql: "gen_random_uuid()"), + UserId = table.Column(type: "uuid", nullable: false), + FirstName = table.Column(type: "text", nullable: false), + LastName = table.Column(type: "text", nullable: false), + Department = table.Column(type: "text", nullable: true), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()") + }, + constraints: table => + { + table.PrimaryKey("PK_AdminProfiles", x => x.Id); + table.ForeignKey( + name: "FK_AdminProfiles_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AuditLogs", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false, defaultValueSql: "gen_random_uuid()"), + UserId = table.Column(type: "uuid", nullable: false), + Action = table.Column(type: "text", nullable: false), + EntityType = table.Column(type: "text", nullable: false), + EntityId = table.Column(type: "uuid", nullable: true), + OldValues = table.Column(type: "jsonb", nullable: true), + NewValues = table.Column(type: "jsonb", nullable: true), + IpAddress = table.Column(type: "text", nullable: true), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()") + }, + constraints: table => + { + table.PrimaryKey("PK_AuditLogs", x => x.Id); + table.ForeignKey( + name: "FK_AuditLogs_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "BorrowerProfiles", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false, defaultValueSql: "gen_random_uuid()"), + UserId = table.Column(type: "uuid", nullable: false), + FirstName = table.Column(type: "text", nullable: false), + LastName = table.Column(type: "text", nullable: false), + MiddleName = table.Column(type: "text", nullable: true), + DateOfBirth = table.Column(type: "date", nullable: false), + Gender = table.Column(type: "text", nullable: false), + CivilStatus = table.Column(type: "text", nullable: false), + Nationality = table.Column(type: "text", nullable: false), + NationalIdType = table.Column(type: "text", nullable: false), + NationalIdNumber = table.Column(type: "text", nullable: false), + EmploymentStatus = table.Column(type: "text", nullable: false), + EmployerName = table.Column(type: "text", nullable: true), + MonthlyIncome = table.Column(type: "numeric(15,2)", precision: 15, scale: 2, nullable: false), + ProfilePhotoUrl = table.Column(type: "text", nullable: true), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()"), + UpdatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()") + }, + constraints: table => + { + table.PrimaryKey("PK_BorrowerProfiles", x => x.Id); + table.ForeignKey( + name: "FK_BorrowerProfiles_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Documents", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false, defaultValueSql: "gen_random_uuid()"), + UserId = table.Column(type: "uuid", nullable: false), + Type = table.Column(type: "text", nullable: false), + FileUrl = table.Column(type: "text", nullable: false), + Status = table.Column(type: "text", nullable: false, defaultValue: "Pending"), + VerifiedBy = table.Column(type: "uuid", nullable: true), + VerifiedAt = table.Column(type: "timestamp with time zone", nullable: true), + RejectionReason = table.Column(type: "text", nullable: true), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()") + }, + constraints: table => + { + table.PrimaryKey("PK_Documents", x => x.Id); + table.ForeignKey( + name: "FK_Documents_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Documents_Users_VerifiedBy", + column: x => x.VerifiedBy, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.SetNull); + }); + + migrationBuilder.CreateTable( + name: "UserRoles", + columns: table => new + { + UserId = table.Column(type: "uuid", nullable: false), + RoleId = table.Column(type: "smallint", nullable: false), + AssignedBy = table.Column(type: "uuid", nullable: true), + AssignedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()") + }, + constraints: table => + { + table.PrimaryKey("PK_UserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_UserRoles_Roles_RoleId", + column: x => x.RoleId, + principalTable: "Roles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_UserRoles_Users_AssignedBy", + column: x => x.AssignedBy, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.SetNull); + table.ForeignKey( + name: "FK_UserRoles_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ReferenceContacts", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false, defaultValueSql: "gen_random_uuid()"), + BorrowerProfileId = table.Column(type: "uuid", nullable: false), + FullName = table.Column(type: "text", nullable: false), + Relationship = table.Column(type: "text", nullable: false), + PhoneNumber = table.Column(type: "text", nullable: false), + Email = table.Column(type: "text", nullable: true), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()") + }, + constraints: table => + { + table.PrimaryKey("PK_ReferenceContacts", x => x.Id); + table.ForeignKey( + name: "FK_ReferenceContacts_BorrowerProfiles_BorrowerProfileId", + column: x => x.BorrowerProfileId, + principalTable: "BorrowerProfiles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_Addresses_UserId", + table: "Addresses", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AdminProfiles_UserId", + table: "AdminProfiles", + column: "UserId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AuditLogs_UserId", + table: "AuditLogs", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_BorrowerProfiles_UserId", + table: "BorrowerProfiles", + column: "UserId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Documents_UserId", + table: "Documents", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_Documents_VerifiedBy", + table: "Documents", + column: "VerifiedBy"); + + migrationBuilder.CreateIndex( + name: "IX_ReferenceContacts_BorrowerProfileId", + table: "ReferenceContacts", + column: "BorrowerProfileId"); + + migrationBuilder.CreateIndex( + name: "IX_Roles_Name", + table: "Roles", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_UserRoles_AssignedBy", + table: "UserRoles", + column: "AssignedBy"); + + migrationBuilder.CreateIndex( + name: "IX_UserRoles_RoleId", + table: "UserRoles", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_Users_Email", + table: "Users", + column: "Email", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Users_PhoneNumber", + table: "Users", + column: "PhoneNumber", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Addresses"); + + migrationBuilder.DropTable( + name: "AdminProfiles"); + + migrationBuilder.DropTable( + name: "AuditLogs"); + + migrationBuilder.DropTable( + name: "Documents"); + + migrationBuilder.DropTable( + name: "ReferenceContacts"); + + migrationBuilder.DropTable( + name: "UserRoles"); + + migrationBuilder.DropTable( + name: "BorrowerProfiles"); + + migrationBuilder.DropTable( + name: "Roles"); + + migrationBuilder.DropTable( + name: "Users"); + } + } +} diff --git a/apps/database/migrations/AppDbContextModelSnapshot.cs b/apps/database/migrations/AppDbContextModelSnapshot.cs new file mode 100644 index 0000000..e3d68fa --- /dev/null +++ b/apps/database/migrations/AppDbContextModelSnapshot.cs @@ -0,0 +1,536 @@ +// +using System; +using HelpingHand.Db; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace HelpingHand.Db.migrations +{ + [DbContext(typeof(AppDbContext))] + partial class AppDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("HelpingHand.Db.Entities.Address", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("Barangay") + .IsRequired() + .HasColumnType("text"); + + b.Property("City") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("IsPrimary") + .HasColumnType("boolean"); + + b.Property("Province") + .IsRequired() + .HasColumnType("text"); + + b.Property("Street") + .IsRequired() + .HasColumnType("text"); + + b.Property("Type") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("ZipCode") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Addresses"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.AdminProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("Department") + .HasColumnType("text"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("text"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("AdminProfiles"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("Action") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("EntityId") + .HasColumnType("uuid"); + + b.Property("EntityType") + .IsRequired() + .HasColumnType("text"); + + b.Property("IpAddress") + .HasColumnType("text"); + + b.Property("NewValues") + .HasColumnType("jsonb"); + + b.Property("OldValues") + .HasColumnType("jsonb"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AuditLogs"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.BorrowerProfile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("CivilStatus") + .IsRequired() + .HasColumnType("text"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("DateOfBirth") + .HasColumnType("date"); + + b.Property("EmployerName") + .HasColumnType("text"); + + b.Property("EmploymentStatus") + .IsRequired() + .HasColumnType("text"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("text"); + + b.Property("Gender") + .IsRequired() + .HasColumnType("text"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("text"); + + b.Property("MiddleName") + .HasColumnType("text"); + + b.Property("MonthlyIncome") + .HasPrecision(15, 2) + .HasColumnType("numeric(15,2)"); + + b.Property("NationalIdNumber") + .IsRequired() + .HasColumnType("text"); + + b.Property("NationalIdType") + .IsRequired() + .HasColumnType("text"); + + b.Property("Nationality") + .IsRequired() + .HasColumnType("text"); + + b.Property("ProfilePhotoUrl") + .HasColumnType("text"); + + b.Property("UpdatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("BorrowerProfiles"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.Document", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("FileUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("RejectionReason") + .HasColumnType("text"); + + b.Property("Status") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasDefaultValue("Pending"); + + b.Property("Type") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("VerifiedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("VerifiedBy") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.HasIndex("VerifiedBy"); + + b.ToTable("Documents"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.ReferenceContact", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("BorrowerProfileId") + .HasColumnType("uuid"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("Email") + .HasColumnType("text"); + + b.Property("FullName") + .IsRequired() + .HasColumnType("text"); + + b.Property("PhoneNumber") + .IsRequired() + .HasColumnType("text"); + + b.Property("Relationship") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("BorrowerProfileId"); + + b.ToTable("ReferenceContacts"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.Role", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("smallint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Roles"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasDefaultValueSql("gen_random_uuid()"); + + b.Property("CreatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("Email") + .IsRequired() + .HasColumnType("text"); + + b.Property("EmailVerifiedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true); + + b.Property("LastLoginAt") + .HasColumnType("timestamp with time zone"); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("text"); + + b.Property("PhoneNumber") + .IsRequired() + .HasColumnType("text"); + + b.Property("PhoneVerifiedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("UpdatedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.HasKey("Id"); + + b.HasIndex("Email") + .IsUnique(); + + b.HasIndex("PhoneNumber") + .IsUnique(); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.UserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("smallint"); + + b.Property("AssignedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("now()"); + + b.Property("AssignedBy") + .HasColumnType("uuid"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("AssignedBy"); + + b.HasIndex("RoleId"); + + b.ToTable("UserRoles"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.Address", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithMany("Addresses") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.AdminProfile", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithOne("AdminProfile") + .HasForeignKey("HelpingHand.Db.Entities.AdminProfile", "UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.AuditLog", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.BorrowerProfile", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithOne("BorrowerProfile") + .HasForeignKey("HelpingHand.Db.Entities.BorrowerProfile", "UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.Document", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithMany("Documents") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("HelpingHand.Db.Entities.User", "VerifiedByUser") + .WithMany() + .HasForeignKey("VerifiedBy") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + + b.Navigation("VerifiedByUser"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.ReferenceContact", b => + { + b.HasOne("HelpingHand.Db.Entities.BorrowerProfile", "BorrowerProfile") + .WithMany("ReferenceContacts") + .HasForeignKey("BorrowerProfileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BorrowerProfile"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.UserRole", b => + { + b.HasOne("HelpingHand.Db.Entities.User", "AssignedByUser") + .WithMany() + .HasForeignKey("AssignedBy") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("HelpingHand.Db.Entities.Role", "Role") + .WithMany("UserRoles") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("HelpingHand.Db.Entities.User", "User") + .WithMany("UserRoles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AssignedByUser"); + + b.Navigation("Role"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.BorrowerProfile", b => + { + b.Navigation("ReferenceContacts"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.Role", b => + { + b.Navigation("UserRoles"); + }); + + modelBuilder.Entity("HelpingHand.Db.Entities.User", b => + { + b.Navigation("Addresses"); + + b.Navigation("AdminProfile"); + + b.Navigation("BorrowerProfile"); + + b.Navigation("Documents"); + + b.Navigation("UserRoles"); + }); +#pragma warning restore 612, 618 + } + } +}