mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
d471b418b9
Targets Rec Room 2020.03.10 client (also serves 2020.03.06).
Re-import after adding:
- DorkNet.ClientMod/dorknet-clientmod.json.template — config schema
the launcher's manifest-driven patcher renders into UserData/.
- tools/build-patcher-zip.ps1 — produces dorknet-clientpatch-{key}.zip
for v1-march-* Release uploads.
- .github/workflows/release.yml — on tag push publishes both
dorknet-server-march_2020_03_10-win-x64.zip and
dorknet-clientpatch-march_2020_03_10.zip as Release assets.
Same scrub rules as december; tools/build-patcher-zip.ps1 added to
the maintainer-side allow-list so it survives.
34 lines
1.2 KiB
C#
34 lines
1.2 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace DorkNet.Server.Data.Entities;
|
|
|
|
/// <summary>
|
|
/// One row per (player, item) pair. Backs both the
|
|
/// <c>/api/equipment/v2/getUnlocked</c> and
|
|
/// <c>/api/consumables/v1/getUnlocked</c> endpoints — the type comes
|
|
/// from the joined <see cref="StoreItemEntity.Category"/>.
|
|
///
|
|
/// For equipment, <see cref="Quantity"/> is always 1 and
|
|
/// <see cref="IsActive"/> tracks whether it's equipped. For
|
|
/// consumables, <see cref="Quantity"/> is the stack size and
|
|
/// <see cref="IsActive"/> tracks whether the player has it favourited /
|
|
/// quick-equipped on the watch.
|
|
/// </summary>
|
|
public class PlayerInventoryEntity
|
|
{
|
|
public long Id { get; set; }
|
|
public long PlayerId { get; set; }
|
|
|
|
/// <summary>FK by string to <see cref="StoreItemEntity.Slug"/>.
|
|
/// Stored as a string rather than an int FK because a player can
|
|
/// be granted items that aren't in the live store (admin-gifted,
|
|
/// legacy retired items, etc.).</summary>
|
|
[MaxLength(64)]
|
|
public string ItemSlug { get; set; } = string.Empty;
|
|
|
|
public int Quantity { get; set; } = 1;
|
|
public bool IsActive { get; set; } = false;
|
|
|
|
public DateTime AcquiredAt { get; set; } = DateTime.UtcNow;
|
|
}
|