diff --git a/Directory.Packages.props b/Directory.Packages.props
deleted file mode 100644
index 9717e70..0000000
--- a/Directory.Packages.props
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Hutopy.sln b/Hutopy.sln
index 5521526..2c58b02 100644
--- a/Hutopy.sln
+++ b/Hutopy.sln
@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure", "src\Infrastructure\Infrastructure.csproj", "{117DA02F-5274-4565-ACC6-DA9B6E568B09}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6ED356A7-8B47-4613-AD01-C85CF28491BD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E2DA20AA-28D1-455C-BF50-C49A8F831633}"
@@ -12,7 +10,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
.gitignore = .gitignore
Directory.Build.props = Directory.Build.props
- Directory.Packages.props = Directory.Packages.props
global.json = global.json
README.md = README.md
start-infrastructure.sh = start-infrastructure.sh
@@ -28,10 +25,6 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {117DA02F-5274-4565-ACC6-DA9B6E568B09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {117DA02F-5274-4565-ACC6-DA9B6E568B09}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {117DA02F-5274-4565-ACC6-DA9B6E568B09}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {117DA02F-5274-4565-ACC6-DA9B6E568B09}.Release|Any CPU.Build.0 = Release|Any CPU
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -41,7 +34,6 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {117DA02F-5274-4565-ACC6-DA9B6E568B09} = {6ED356A7-8B47-4613-AD01-C85CF28491BD}
{4E4EE20C-F06A-4A1B-851F-C5577796941C} = {6ED356A7-8B47-4613-AD01-C85CF28491BD}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
diff --git a/src/Infrastructure/Data/ApplicationDbContext.cs b/src/Infrastructure/Data/ApplicationDbContext.cs
deleted file mode 100644
index ae691cb..0000000
--- a/src/Infrastructure/Data/ApplicationDbContext.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using Hutopy.Infrastructure.Identity;
-using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore;
-
-namespace Hutopy.Infrastructure.Data
-{
- public class ApplicationDbContext(
- DbContextOptions options)
- : IdentityDbContext(options);
-}
diff --git a/src/Infrastructure/DependencyInjection.cs b/src/Infrastructure/DependencyInjection.cs
deleted file mode 100644
index bffd9d3..0000000
--- a/src/Infrastructure/DependencyInjection.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using Hutopy.Infrastructure.BlobStorage;
-using Hutopy.Infrastructure.Data;
-using Hutopy.Infrastructure.Identity;
-using Microsoft.AspNetCore.Identity;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Diagnostics;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-
-namespace Hutopy.Infrastructure;
-
-public static class DependencyInjection
-{
- public static IServiceCollection AddInfrastructureServices(this IServiceCollection services,
- IConfiguration configuration)
- {
- // Replace password in the connection string with env var in local environment.
- // Prod will use the connectionString stored in the vault with password in it directly.
- var connectionString = configuration.GetConnectionString("MssqlConnection")
- ?? throw new InvalidOperationException("Missing ConnectionStrings:MssqlConnection");
-
- services.AddDbContext((sp, options) =>
- {
- options.AddInterceptors(sp.GetServices());
- options.UseSqlServer(connectionString);
- });
-
- services.AddScoped();
-
- services.AddAuthentication()
- .AddBearerToken(IdentityConstants.BearerScheme);
-
- services.AddAuthorizationBuilder();
-
- services
- .AddIdentityCore()
- .AddUserManager()
- .AddRoles()
- .AddEntityFrameworkStores()
- .AddApiEndpoints()
- .AddSignInManager>()
- .AddDefaultTokenProviders();
-
- // Singleton services
- services.AddSingleton(TimeProvider.System);
- services.AddSingleton();
-
- // Scoped services
- services.AddScoped();
-
- return services;
- }
-}
diff --git a/src/Infrastructure/GlobalUsings.cs b/src/Infrastructure/GlobalUsings.cs
deleted file mode 100644
index f176ce1..0000000
--- a/src/Infrastructure/GlobalUsings.cs
+++ /dev/null
@@ -1,4 +0,0 @@
-global using System;
-global using System.Linq;
-global using System.Threading;
-global using System.Threading.Tasks;
diff --git a/src/Infrastructure/Infrastructure.csproj b/src/Infrastructure/Infrastructure.csproj
deleted file mode 100644
index 0967acf..0000000
--- a/src/Infrastructure/Infrastructure.csproj
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
- Hutopy.Infrastructure
- Hutopy.Infrastructure
-
-
-
-
-
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Infrastructure/Migrations/20240802044736_Initial.Designer.cs b/src/Infrastructure/Migrations/20240802044736_Initial.Designer.cs
deleted file mode 100644
index ad817a1..0000000
--- a/src/Infrastructure/Migrations/20240802044736_Initial.Designer.cs
+++ /dev/null
@@ -1,444 +0,0 @@
-//
-using System;
-using Hutopy.Infrastructure.Data;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace Hutopy.Infrastructure.Migrations
-{
- [DbContext(typeof(ApplicationDbContext))]
- [Migration("20240802044736_Initial")]
- partial class Initial
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.4")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("Hutopy.Domain.Entities.FutureCreator", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("CreatedAt")
- .HasColumnType("datetimeoffset");
-
- b.Property("CreatedBy")
- .HasColumnType("uniqueidentifier");
-
- b.Property("EmailAddress")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("FirstName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("LastModifiedAt")
- .HasColumnType("datetimeoffset");
-
- b.Property("LastModifiedBy")
- .HasColumnType("uniqueidentifier");
-
- b.Property("LastName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("PhoneNumber")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("ReasonToJoin")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("SocialNetworkAccount")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("FutureCreators");
- });
-
- modelBuilder.Entity("Hutopy.Domain.Entities.UserTransaction", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("Amount")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("ApplicationUserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("CreatedAt")
- .HasColumnType("datetimeoffset");
-
- b.Property("CreatedBy")
- .HasColumnType("uniqueidentifier");
-
- b.Property("Currency")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IsConfirmed")
- .HasColumnType("bit");
-
- b.Property("LastModifiedAt")
- .HasColumnType("datetimeoffset");
-
- b.Property("LastModifiedBy")
- .HasColumnType("uniqueidentifier");
-
- b.Property("Paid")
- .HasColumnType("bit");
-
- b.Property("StripeBillingDetailEmail")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripeBillingDetailName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripeChargeId")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripeEventId")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripePaymentIntent")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripePaymentMethod")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripeReceiptUrl")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("TipMessage")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.HasIndex("ApplicationUserId");
-
- b.ToTable("UserTransactions");
- });
-
- modelBuilder.Entity("Hutopy.Infrastructure.Identity.ApplicationRole", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Name")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("NormalizedName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedName")
- .IsUnique()
- .HasDatabaseName("RoleNameIndex")
- .HasFilter("[NormalizedName] IS NOT NULL");
-
- b.ToTable("AspNetRoles", (string)null);
- });
-
- modelBuilder.Entity("Hutopy.Infrastructure.Identity.ApplicationUser", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("AccessFailedCount")
- .HasColumnType("int");
-
- b.Property("Address")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("Alias")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("BirthDate")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("City")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Country")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("Email")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("EmailConfirmed")
- .HasColumnType("bit");
-
- b.Property("FirstName")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("LastName")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("LockoutEnabled")
- .HasColumnType("bit");
-
- b.Property("LockoutEnd")
- .HasColumnType("datetimeoffset");
-
- b.Property("NormalizedEmail")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("NormalizedUserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("Occupation")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("PasswordHash")
- .HasColumnType("nvarchar(max)");
-
- b.Property("PhoneNumber")
- .HasColumnType("nvarchar(max)");
-
- b.Property("PhoneNumberConfirmed")
- .HasColumnType("bit");
-
- b.Property("PortraitUrl")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("SecurityStamp")
- .HasColumnType("nvarchar(max)");
-
- b.Property("TwoFactorEnabled")
- .HasColumnType("bit");
-
- b.Property("UserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedEmail")
- .HasDatabaseName("EmailIndex");
-
- b.HasIndex("NormalizedUserName")
- .IsUnique()
- .HasDatabaseName("UserNameIndex")
- .HasFilter("[NormalizedUserName] IS NOT NULL");
-
- b.ToTable("AspNetUsers", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ClaimType")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ClaimValue")
- .HasColumnType("nvarchar(max)");
-
- b.Property("RoleId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("Id");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetRoleClaims", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ClaimType")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ClaimValue")
- .HasColumnType("nvarchar(max)");
-
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("Id");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserClaims", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.Property("LoginProvider")
- .HasColumnType("nvarchar(450)");
-
- b.Property("ProviderKey")
- .HasColumnType("nvarchar(450)");
-
- b.Property("ProviderDisplayName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("LoginProvider", "ProviderKey");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserLogins", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("RoleId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("UserId", "RoleId");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetUserRoles", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("LoginProvider")
- .HasColumnType("nvarchar(450)");
-
- b.Property("Name")
- .HasColumnType("nvarchar(450)");
-
- b.Property("Value")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("UserId", "LoginProvider", "Name");
-
- b.ToTable("AspNetUserTokens", (string)null);
- });
-
- modelBuilder.Entity("Hutopy.Domain.Entities.UserTransaction", b =>
- {
- b.HasOne("Hutopy.Infrastructure.Identity.ApplicationUser", null)
- .WithMany()
- .HasForeignKey("ApplicationUserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.HasOne("Hutopy.Infrastructure.Identity.ApplicationRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.HasOne("Hutopy.Infrastructure.Identity.ApplicationUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.HasOne("Hutopy.Infrastructure.Identity.ApplicationUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.HasOne("Hutopy.Infrastructure.Identity.ApplicationRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Hutopy.Infrastructure.Identity.ApplicationUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.HasOne("Hutopy.Infrastructure.Identity.ApplicationUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/src/Infrastructure/Migrations/20240802044736_Initial.cs b/src/Infrastructure/Migrations/20240802044736_Initial.cs
deleted file mode 100644
index 5b50f9c..0000000
--- a/src/Infrastructure/Migrations/20240802044736_Initial.cs
+++ /dev/null
@@ -1,299 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace Hutopy.Infrastructure.Migrations
-{
- ///
- public partial class Initial : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "AspNetRoles",
- columns: table => new
- {
- Id = table.Column(type: "uniqueidentifier", nullable: false),
- Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetRoles", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUsers",
- columns: table => new
- {
- Id = table.Column(type: "uniqueidentifier", nullable: false),
- Alias = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- FirstName = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- LastName = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- Occupation = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- BirthDate = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- Country = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- City = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- Address = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- PortraitUrl = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true),
- UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- EmailConfirmed = table.Column(type: "bit", nullable: false),
- PasswordHash = table.Column(type: "nvarchar(max)", nullable: true),
- SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true),
- ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true),
- PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true),
- PhoneNumberConfirmed = table.Column(type: "bit", nullable: false),
- TwoFactorEnabled = table.Column(type: "bit", nullable: false),
- LockoutEnd = table.Column(type: "datetimeoffset", nullable: true),
- LockoutEnabled = table.Column(type: "bit", nullable: false),
- AccessFailedCount = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUsers", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "FutureCreators",
- columns: table => new
- {
- Id = table.Column(type: "uniqueidentifier", nullable: false),
- FirstName = table.Column(type: "nvarchar(max)", nullable: false),
- LastName = table.Column(type: "nvarchar(max)", nullable: false),
- EmailAddress = table.Column(type: "nvarchar(max)", nullable: false),
- PhoneNumber = table.Column(type: "nvarchar(max)", nullable: false),
- SocialNetworkAccount = table.Column(type: "nvarchar(max)", nullable: false),
- ReasonToJoin = table.Column(type: "nvarchar(max)", nullable: false),
- CreatedAt = table.Column(type: "datetimeoffset", nullable: false),
- CreatedBy = table.Column(type: "uniqueidentifier", nullable: true),
- LastModifiedAt = table.Column(type: "datetimeoffset", nullable: false),
- LastModifiedBy = table.Column(type: "uniqueidentifier", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FutureCreators", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetRoleClaims",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- RoleId = table.Column(type: "uniqueidentifier", nullable: false),
- ClaimType = table.Column(type: "nvarchar(max)", nullable: true),
- ClaimValue = table.Column(type: "nvarchar(max)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
- table.ForeignKey(
- name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
- column: x => x.RoleId,
- principalTable: "AspNetRoles",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserClaims",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- UserId = table.Column(type: "uniqueidentifier", nullable: false),
- ClaimType = table.Column(type: "nvarchar(max)", nullable: true),
- ClaimValue = table.Column(type: "nvarchar(max)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
- table.ForeignKey(
- name: "FK_AspNetUserClaims_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserLogins",
- columns: table => new
- {
- LoginProvider = table.Column(type: "nvarchar(450)", nullable: false),
- ProviderKey = table.Column(type: "nvarchar(450)", nullable: false),
- ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true),
- UserId = table.Column(type: "uniqueidentifier", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
- table.ForeignKey(
- name: "FK_AspNetUserLogins_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserRoles",
- columns: table => new
- {
- UserId = table.Column(type: "uniqueidentifier", nullable: false),
- RoleId = table.Column(type: "uniqueidentifier", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
- table.ForeignKey(
- name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
- column: x => x.RoleId,
- principalTable: "AspNetRoles",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_AspNetUserRoles_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserTokens",
- columns: table => new
- {
- UserId = table.Column(type: "uniqueidentifier", nullable: false),
- LoginProvider = table.Column(type: "nvarchar(450)", nullable: false),
- Name = table.Column(type: "nvarchar(450)", nullable: false),
- Value = table.Column(type: "nvarchar(max)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
- table.ForeignKey(
- name: "FK_AspNetUserTokens_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "UserTransactions",
- columns: table => new
- {
- Id = table.Column(type: "uniqueidentifier", nullable: false),
- Amount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
- Currency = table.Column(type: "nvarchar(max)", nullable: false),
- TipMessage = table.Column(type: "nvarchar(max)", nullable: false),
- ApplicationUserId = table.Column(type: "uniqueidentifier", nullable: false),
- IsConfirmed = table.Column(type: "bit", nullable: false),
- StripeEventId = table.Column(type: "nvarchar(max)", nullable: false),
- StripeChargeId = table.Column(type: "nvarchar(max)", nullable: false),
- StripePaymentIntent = table.Column(type: "nvarchar(max)", nullable: false),
- StripePaymentMethod = table.Column(type: "nvarchar(max)", nullable: false),
- StripeReceiptUrl = table.Column(type: "nvarchar(max)", nullable: false),
- StripeBillingDetailEmail = table.Column(type: "nvarchar(max)", nullable: false),
- StripeBillingDetailName = table.Column(type: "nvarchar(max)", nullable: false),
- Paid = table.Column(type: "bit", nullable: false),
- CreatedAt = table.Column(type: "datetimeoffset", nullable: false),
- CreatedBy = table.Column(type: "uniqueidentifier", nullable: true),
- LastModifiedAt = table.Column(type: "datetimeoffset", nullable: false),
- LastModifiedBy = table.Column(type: "uniqueidentifier", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_UserTransactions", x => x.Id);
- table.ForeignKey(
- name: "FK_UserTransactions_AspNetUsers_ApplicationUserId",
- column: x => x.ApplicationUserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetRoleClaims_RoleId",
- table: "AspNetRoleClaims",
- column: "RoleId");
-
- migrationBuilder.CreateIndex(
- name: "RoleNameIndex",
- table: "AspNetRoles",
- column: "NormalizedName",
- unique: true,
- filter: "[NormalizedName] IS NOT NULL");
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUserClaims_UserId",
- table: "AspNetUserClaims",
- column: "UserId");
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUserLogins_UserId",
- table: "AspNetUserLogins",
- column: "UserId");
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUserRoles_RoleId",
- table: "AspNetUserRoles",
- column: "RoleId");
-
- migrationBuilder.CreateIndex(
- name: "EmailIndex",
- table: "AspNetUsers",
- column: "NormalizedEmail");
-
- migrationBuilder.CreateIndex(
- name: "UserNameIndex",
- table: "AspNetUsers",
- column: "NormalizedUserName",
- unique: true,
- filter: "[NormalizedUserName] IS NOT NULL");
-
- migrationBuilder.CreateIndex(
- name: "IX_UserTransactions_ApplicationUserId",
- table: "UserTransactions",
- column: "ApplicationUserId");
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "AspNetRoleClaims");
-
- migrationBuilder.DropTable(
- name: "AspNetUserClaims");
-
- migrationBuilder.DropTable(
- name: "AspNetUserLogins");
-
- migrationBuilder.DropTable(
- name: "AspNetUserRoles");
-
- migrationBuilder.DropTable(
- name: "AspNetUserTokens");
-
- migrationBuilder.DropTable(
- name: "FutureCreators");
-
- migrationBuilder.DropTable(
- name: "UserTransactions");
-
- migrationBuilder.DropTable(
- name: "AspNetRoles");
-
- migrationBuilder.DropTable(
- name: "AspNetUsers");
- }
- }
-}
diff --git a/src/Infrastructure/Migrations/20240903230821_ChangeBirthDateToDateTime.Designer.cs b/src/Infrastructure/Migrations/20240903230821_ChangeBirthDateToDateTime.Designer.cs
deleted file mode 100644
index fbdfc47..0000000
--- a/src/Infrastructure/Migrations/20240903230821_ChangeBirthDateToDateTime.Designer.cs
+++ /dev/null
@@ -1,436 +0,0 @@
-//
-using System;
-using Hutopy.Infrastructure.Data;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace Hutopy.Infrastructure.Migrations
-{
- [DbContext(typeof(ApplicationDbContext))]
- [Migration("20240903230821_ChangeBirthDateToDateTime")]
- partial class ChangeBirthDateToDateTime
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.4")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("Hutopy.Domain.Entities.FutureCreator", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("CreatedAt")
- .HasColumnType("datetimeoffset");
-
- b.Property("CreatedBy")
- .HasColumnType("uniqueidentifier");
-
- b.Property("EmailAddress")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("FirstName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("LastModifiedAt")
- .HasColumnType("datetimeoffset");
-
- b.Property("LastModifiedBy")
- .HasColumnType("uniqueidentifier");
-
- b.Property("LastName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("PhoneNumber")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("ReasonToJoin")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("SocialNetworkAccount")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("FutureCreators");
- });
-
- modelBuilder.Entity("Hutopy.Domain.Entities.UserTransaction", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("Amount")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("ApplicationUserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("CreatedAt")
- .HasColumnType("datetimeoffset");
-
- b.Property("CreatedBy")
- .HasColumnType("uniqueidentifier");
-
- b.Property("Currency")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IsConfirmed")
- .HasColumnType("bit");
-
- b.Property("LastModifiedAt")
- .HasColumnType("datetimeoffset");
-
- b.Property("LastModifiedBy")
- .HasColumnType("uniqueidentifier");
-
- b.Property("Paid")
- .HasColumnType("bit");
-
- b.Property("StripeBillingDetailEmail")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripeBillingDetailName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripeChargeId")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripeEventId")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripePaymentIntent")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripePaymentMethod")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("StripeReceiptUrl")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("TipMessage")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.HasIndex("ApplicationUserId");
-
- b.ToTable("UserTransactions");
- });
-
- modelBuilder.Entity("Hutopy.Infrastructure.Identity.ApplicationRole", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Name")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("NormalizedName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedName")
- .IsUnique()
- .HasDatabaseName("RoleNameIndex")
- .HasFilter("[NormalizedName] IS NOT NULL");
-
- b.ToTable("AspNetRoles", (string)null);
- });
-
- modelBuilder.Entity("Hutopy.Infrastructure.Identity.ApplicationUser", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("AccessFailedCount")
- .HasColumnType("int");
-
- b.Property("Address")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("Alias")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("BirthDate")
- .HasMaxLength(255)
- .HasColumnType("datetime2");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("EmailConfirmed")
- .HasColumnType("bit");
-
- b.Property("Firstname")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("Lastname")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("LockoutEnabled")
- .HasColumnType("bit");
-
- b.Property("LockoutEnd")
- .HasColumnType("datetimeoffset");
-
- b.Property("NormalizedEmail")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("NormalizedUserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("Occupation")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("PasswordHash")
- .HasColumnType("nvarchar(max)");
-
- b.Property("PhoneNumber")
- .HasColumnType("nvarchar(max)");
-
- b.Property("PhoneNumberConfirmed")
- .HasColumnType("bit");
-
- b.Property("PortraitUrl")
- .HasMaxLength(255)
- .HasColumnType("nvarchar(255)");
-
- b.Property("SecurityStamp")
- .HasColumnType("nvarchar(max)");
-
- b.Property("TwoFactorEnabled")
- .HasColumnType("bit");
-
- b.Property("UserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedEmail")
- .HasDatabaseName("EmailIndex");
-
- b.HasIndex("NormalizedUserName")
- .IsUnique()
- .HasDatabaseName("UserNameIndex")
- .HasFilter("[NormalizedUserName] IS NOT NULL");
-
- b.ToTable("AspNetUsers", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ClaimType")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ClaimValue")
- .HasColumnType("nvarchar(max)");
-
- b.Property("RoleId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("Id");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetRoleClaims", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ClaimType")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ClaimValue")
- .HasColumnType("nvarchar(max)");
-
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("Id");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserClaims", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.Property("LoginProvider")
- .HasColumnType("nvarchar(450)");
-
- b.Property("ProviderKey")
- .HasColumnType("nvarchar(450)");
-
- b.Property("ProviderDisplayName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("LoginProvider", "ProviderKey");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserLogins", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("RoleId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("UserId", "RoleId");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetUserRoles", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("LoginProvider")
- .HasColumnType("nvarchar(450)");
-
- b.Property("Name")
- .HasColumnType("nvarchar(450)");
-
- b.Property("Value")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("UserId", "LoginProvider", "Name");
-
- b.ToTable("AspNetUserTokens", (string)null);
- });
-
- modelBuilder.Entity("Hutopy.Domain.Entities.UserTransaction", b =>
- {
- b.HasOne("Hutopy.Infrastructure.Identity.ApplicationUser", null)
- .WithMany()
- .HasForeignKey("ApplicationUserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim