Skip to content

Commit

Permalink
work on stripe integration
Browse files Browse the repository at this point in the history
  • Loading branch information
th0mk committed Jan 4, 2025
1 parent 07036f9 commit 22d0497
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FMBot.Persistence.Domain\FMBot.Persistence.Domain.csproj" />
<ProjectReference Include="..\Shared.Domain\Shared.Domain.csproj" />
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions src/FMBot.Persistence.EntityFrameWork/FMBotDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using FMBot.Persistence.Domain.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Shared.Domain.Models;

namespace FMBot.Persistence.EntityFrameWork
{
Expand All @@ -18,6 +19,8 @@ public class FMBotDbContext : DbContext
public virtual DbSet<User> Users { get; set; }
public virtual DbSet<Supporter> Supporters { get; set; }

// public virtual DbSet<StripeSupporter> StripeSupporters { get; set; }

public virtual DbSet<DiscogsRelease> DiscogsReleases { get; set; }
public virtual DbSet<UserDiscogsReleases> UserDiscogsReleases { get; set; }
public virtual DbSet<UserDiscogs> UserDiscogs { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace FMBot.Domain.Enums;
namespace Shared.Domain.Enums;

public enum SupporterStripeType
public enum StripeSupporterType
{
Supporter = 1,
GiftedSupporter = 2,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
using System;
using FMBot.Domain.Enums;
using FMBot.Domain.Models;
using Shared.Domain.Enums;

namespace FMBot.Persistence.Domain.Models;
namespace Shared.Domain.Models;

public class SupporterStripe
// This file is managed in Shared.Domain and copied to child projects
public class StripeSupporter
{
public ulong PurchaserDiscordUserId { get; set; }

public ulong PurchaserLastFmUserName { get; set; }
public string PurchaserLastFmUserName { get; set; }

public ulong? GiftReceiverDiscordUserId { get; set; }

public string Email { get; set; }

public string StripeCustomerId { get; set; }

public string StripeSubscriptionId { get; set; }
Expand All @@ -26,5 +23,9 @@ public class SupporterStripe

public int Quantity { get; set; }

public SupporterStripeType Type { get; set; }
public int? TimesTransferred { get; set; }

public DateTime? LastTimeTransferred { get; set; }

public StripeSupporterType Type { get; set; }
}
2 changes: 1 addition & 1 deletion src/Shared.Domain/Shared.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Nullable>disable</Nullable>
<AssemblyName>Shared.Domain</AssemblyName>
<RootNamespace>Shared.Domain</RootNamespace>
</PropertyGroup>
Expand Down

0 comments on commit 22d0497

Please sign in to comment.