Skip to content

Commit

Permalink
Add party power calculation service (#374)
Browse files Browse the repository at this point in the history
Co-authored-by: Nightmerp <[email protected]>
  • Loading branch information
LukeFZ and Nightmerp authored Aug 9, 2023
1 parent a52053e commit 388cb94
Show file tree
Hide file tree
Showing 40 changed files with 3,712 additions and 47 deletions.
2 changes: 2 additions & 0 deletions DragaliaAPI.Database/ApiContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,6 @@ but EF Core doesn't like this and the client probably stops you anyway?
public DbSet<DbSummonTicket> PlayerSummonTickets { get; set; }

public DbSet<DbEmblem> Emblems { get; set; }

public DbSet<DbPartyPower> PartyPowers { get; set; }
}
20 changes: 20 additions & 0 deletions DragaliaAPI.Database/Entities/DbPartyPower.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;

namespace DragaliaAPI.Database.Entities;

[PrimaryKey(nameof(DeviceAccountId))]
public class DbPartyPower : IDbHasAccountId
{
/// <inheritdoc />
public virtual DbPlayer? Owner { get; set; }

/// <inheritdoc />
[ForeignKey(nameof(Owner))]
[Required]
public required string DeviceAccountId { get; set; }

[Column("MaxPartyPower")]
public int MaxPartyPower { get; set; }
}
2 changes: 2 additions & 0 deletions DragaliaAPI.Database/Entities/DbPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@ public class DbPlayer
new List<DbPlayerDmodeServitorPassive>();

public virtual DbPlayerShopInfo? ShopInfo { get; set; }

public virtual DbPartyPower? PartyPower { get; set; }
}
Loading

0 comments on commit 388cb94

Please sign in to comment.