27 lines
1.1 KiB
C#
27 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Postgrest.Attributes;
|
|
using Postgrest.Models;
|
|
|
|
namespace Game.Data
|
|
{
|
|
[Table("players")]
|
|
public class PlayerRecord : BaseModel
|
|
{
|
|
[PrimaryKey("wallet_address", false)]
|
|
[Column("wallet_address")] public string WalletAddress { get; set; }
|
|
[Column("display_name")] public string DisplayName { get; set; }
|
|
[Column("total_kills")] public int TotalKills { get; set; }
|
|
[Column("in_game_currency")] public long InGameCurrency { get; set; }
|
|
|
|
[Column("purchased_items")] public Dictionary<string, object> PurchasedItems { get; set; } = new();
|
|
|
|
// server-computed or trigger-updated fields (read-only from client)
|
|
[Column("average_placement")] public decimal AveragePlacement { get; set; }
|
|
[Column("win_percentage")] public decimal WinPercentage { get; set; }
|
|
[Column("games_played")] public int GamesPlayed { get; set; }
|
|
[Column("games_won")] public int GamesWon { get; set; }
|
|
[Column("updated_at")] public DateTimeOffset? UpdatedAt { get; set; }
|
|
}
|
|
}
|