Skip to content

Commit

Permalink
Merge pull request #384 from SapiensAnatis/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
SapiensAnatis authored Aug 10, 2023
2 parents b938cdb + 640a641 commit f031c39
Show file tree
Hide file tree
Showing 105 changed files with 6,554 additions and 1,675 deletions.
25 changes: 0 additions & 25 deletions DragaliaAPI.Database.Test/Repositories/QuestRepositoryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,4 @@ await this.fixture.AddRangeToDatabase(
)
.And.BeEquivalentTo(this.questRepository.Quests);
}

[Fact]
public async Task CompleteQuest_CompletesQuest()
{
DbQuest quest = await this.questRepository.CompleteQuest(3, 1.0f);

quest
.Should()
.BeEquivalentTo(
new DbQuest()
{
DeviceAccountId = "id",
QuestId = 3,
State = 3,
IsMissionClear1 = false,
IsMissionClear2 = false,
IsMissionClear3 = false,
PlayCount = 1,
DailyPlayCount = 1,
WeeklyPlayCount = 1,
IsAppear = true,
BestClearTime = 1.0f,
}
);
}
}
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; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class DbDetailedPartyUnit

public DbWeaponBody? WeaponBodyData { get; set; }

public IEnumerable<DbAbilityCrest> CrestSlotType1CrestList { get; set; } =
public IEnumerable<DbAbilityCrest?> CrestSlotType1CrestList { get; set; } =
Enumerable.Empty<DbAbilityCrest>();

public IEnumerable<DbAbilityCrest?> CrestSlotType2CrestList { get; set; } =
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
namespace DragaliaAPI.Database.Migrations
{
/// <inheritdoc />
#pragma warning disable CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
public partial class questclearparties : Migration
#pragma warning restore CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
Expand Down
Loading

0 comments on commit f031c39

Please sign in to comment.