fix createaccount, add orientation room datablob, add room datablob get

This commit is contained in:
Lapis
2026-06-14 16:17:14 -04:00
parent 4f44b23ff7
commit 5696c71056
14 changed files with 3815 additions and 411 deletions
+1
View File
@@ -8,3 +8,4 @@ riderModule.iml
CannedNet.sln.DotSettings.user CannedNet.sln.DotSettings.user
CannedNet/Data/PrivateKey.pem CannedNet/Data/PrivateKey.pem
/CannedNet/.zed /CannedNet/.zed
CannedNet/Data/PublicKey.pem
+4
View File
@@ -10,6 +10,10 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.8" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.8">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.4" /> <PackageReference Include="SixLabors.ImageSharp" Version="3.1.4" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="10.2.1" /> <PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="10.2.1" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="10.2.1" /> <PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="10.2.1" />
File diff suppressed because one or more lines are too long
@@ -0,0 +1,1133 @@
// <auto-generated />
using System;
using System.Collections.Generic;
using CannedNet.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace CannedNet.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20260614165446_MakeDataSavedAtNullable")]
partial class MakeDataSavedAtNullable
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("CannedNet.Account", b =>
{
b.Property<int>("AccountId")
.HasColumnType("integer")
.HasJsonPropertyName("accountId");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasJsonPropertyName("createdAt");
b.Property<string>("DisplayName")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("displayName");
b.Property<int?>("IdentityFlags")
.HasColumnType("integer")
.HasJsonPropertyName("identityFlags");
b.Property<bool>("IsJunior")
.HasColumnType("boolean")
.HasJsonPropertyName("isJunior");
b.Property<int?>("PersonalPronouns")
.HasColumnType("integer")
.HasJsonPropertyName("personalPronouns");
b.Property<int?>("Platforms")
.HasColumnType("integer")
.HasJsonPropertyName("platforms");
b.Property<string>("ProfileImage")
.HasColumnType("text")
.HasJsonPropertyName("profileImage");
b.Property<string>("Username")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("username");
b.HasKey("AccountId");
b.ToTable("accounts", (string)null);
});
modelBuilder.Entity("CannedNet.AvatarItem", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AvatarItemDesc")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("avatarItemDesc");
b.Property<int>("AvatarItemType")
.HasColumnType("integer")
.HasJsonPropertyName("avatarItemType");
b.Property<string>("FriendlyName")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("friendlyName");
b.Property<int>("OwnerAccountId")
.HasColumnType("integer");
b.Property<int>("PlatformMask")
.HasColumnType("integer")
.HasJsonPropertyName("platformMask");
b.Property<int>("Rarity")
.HasColumnType("integer")
.HasJsonPropertyName("rarity");
b.Property<string>("Tooltip")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("tooltip");
b.HasKey("Id");
b.HasIndex("OwnerAccountId");
b.ToTable("avatar_items", (string)null);
});
modelBuilder.Entity("CannedNet.CachedLogin", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AccountId")
.HasColumnType("integer")
.HasJsonPropertyName("accountId");
b.Property<DateTime>("LastLoginTime")
.HasColumnType("timestamp with time zone")
.HasJsonPropertyName("lastLoginTime");
b.Property<int>("Platform")
.HasColumnType("integer")
.HasJsonPropertyName("platform");
b.Property<string>("PlatformID")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("platformId");
b.Property<bool>("RequirePassword")
.HasColumnType("boolean")
.HasJsonPropertyName("requirePassword");
b.HasKey("Id");
b.HasIndex("Platform", "PlatformID");
b.ToTable("cached_logins", (string)null);
});
modelBuilder.Entity("CannedNet.LoadScreen", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ImageUrl")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("imageUrl");
b.Property<bool>("IsThumbnail")
.HasColumnType("boolean")
.HasJsonPropertyName("isThumbnail");
b.Property<int>("RoomId")
.HasColumnType("integer");
b.Property<string>("Tooltip")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("tooltip");
b.HasKey("Id");
b.HasIndex("RoomId");
b.ToTable("load_screens", (string)null);
});
modelBuilder.Entity("CannedNet.Models.ConsumableItem", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ActiveDurationMinutes")
.HasColumnType("integer")
.HasJsonPropertyName("ActiveDurationMinutes");
b.Property<string>("ConsumableItemDesc")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("ConsumableItemDesc");
b.Property<int>("Count")
.HasColumnType("integer")
.HasJsonPropertyName("Count");
b.PrimitiveCollection<List<DateTime>>("CreatedAts")
.IsRequired()
.HasColumnType("timestamp with time zone[]")
.HasJsonPropertyName("CreatedAts");
b.PrimitiveCollection<List<int>>("Ids")
.IsRequired()
.HasColumnType("integer[]")
.HasJsonPropertyName("Ids");
b.Property<int>("InitialCount")
.HasColumnType("integer")
.HasJsonPropertyName("InitialCount");
b.Property<bool>("IsActive")
.HasColumnType("boolean")
.HasJsonPropertyName("IsActive");
b.Property<bool>("IsTransferable")
.HasColumnType("boolean")
.HasJsonPropertyName("IsTransferable");
b.Property<int>("OwnerAccountId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("OwnerAccountId");
b.ToTable("consumable_items", (string)null);
});
modelBuilder.Entity("CannedNet.Models.EarnableReward", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AvatarItemDesc")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("avatarItemDesc");
b.Property<int>("AvatarItemType")
.HasColumnType("integer")
.HasJsonPropertyName("avatarItemType");
b.Property<string>("ConsumableItemDesc")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("consumableItemDesc");
b.Property<string>("FriendlyName")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("friendlyName");
b.Property<int>("GiftRarity")
.HasColumnType("integer")
.HasJsonPropertyName("giftRarity");
b.Property<int>("RewardContext")
.HasColumnType("integer")
.HasJsonPropertyName("rewardContext");
b.HasKey("Id");
b.HasIndex("RewardContext");
b.ToTable("earnable_rewards", (string)null);
});
modelBuilder.Entity("CannedNet.Models.GiftDrop", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AvatarItemDesc")
.HasColumnType("text");
b.Property<int>("AvatarItemType")
.HasColumnType("integer");
b.Property<string>("ConsumableItemDesc")
.HasColumnType("text");
b.Property<int>("Context")
.HasColumnType("integer");
b.Property<int>("Currency")
.HasColumnType("integer");
b.Property<int>("CurrencyType")
.HasColumnType("integer");
b.Property<string>("EquipmentModificationGuid")
.HasColumnType("text");
b.Property<string>("EquipmentPrefabName")
.HasColumnType("text");
b.Property<string>("FriendlyName")
.IsRequired()
.HasColumnType("text");
b.Property<int>("GiftDropId")
.HasColumnType("integer");
b.Property<bool>("IsQuery")
.HasColumnType("boolean");
b.Property<string>("ItemSetFriendlyName")
.HasColumnType("text");
b.Property<int?>("ItemSetId")
.HasColumnType("integer");
b.Property<int>("Level")
.HasColumnType("integer");
b.Property<int>("Rarity")
.HasColumnType("integer");
b.Property<int>("StorefrontItemId")
.HasColumnType("integer");
b.Property<bool>("SubscribersOnly")
.HasColumnType("boolean");
b.Property<string>("Tooltip")
.HasColumnType("text");
b.Property<bool>("Unique")
.HasColumnType("boolean");
b.HasKey("Id");
b.HasIndex("StorefrontItemId");
b.ToTable("gift_drops", (string)null);
});
modelBuilder.Entity("CannedNet.Models.ReceivedGift", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AvatarItemDesc")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("avatarItemDesc");
b.Property<int>("AvatarItemType")
.HasColumnType("integer")
.HasJsonPropertyName("avatarItemType");
b.Property<int>("BalanceType")
.HasColumnType("integer")
.HasJsonPropertyName("balanceType");
b.Property<string>("ConsumableItemDesc")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("consumableItemDesc");
b.Property<DateTime?>("ConsumedAt")
.HasColumnType("timestamp with time zone")
.HasJsonPropertyName("consumedAt");
b.Property<int>("Currency")
.HasColumnType("integer")
.HasJsonPropertyName("currency");
b.Property<int>("CurrencyType")
.HasColumnType("integer")
.HasJsonPropertyName("currencyType");
b.Property<string>("EquipmentModificationGuid")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("equipmentModificationGuid");
b.Property<string>("EquipmentPrefabName")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("equipmentPrefabName");
b.Property<string>("FriendlyName")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("friendlyName");
b.Property<int?>("FromPlayerId")
.HasColumnType("integer")
.HasJsonPropertyName("fromPlayerId");
b.Property<int>("GiftContext")
.HasColumnType("integer")
.HasJsonPropertyName("giftContext");
b.Property<int>("GiftRarity")
.HasColumnType("integer")
.HasJsonPropertyName("giftRarity");
b.Property<bool>("IsConsumed")
.HasColumnType("boolean")
.HasJsonPropertyName("isConsumed");
b.Property<int>("Level")
.HasColumnType("integer")
.HasJsonPropertyName("level");
b.Property<string>("Message")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("message");
b.Property<int>("Platform")
.HasColumnType("integer")
.HasJsonPropertyName("platform");
b.Property<int>("PlatformsToSpawnOn")
.HasColumnType("integer")
.HasJsonPropertyName("platformsToSpawnOn");
b.Property<DateTime>("ReceivedAt")
.HasColumnType("timestamp with time zone")
.HasJsonPropertyName("receivedAt");
b.Property<int>("ReceiverAccountId")
.HasColumnType("integer")
.HasJsonPropertyName("receiverAccountId");
b.Property<int>("Xp")
.HasColumnType("integer")
.HasJsonPropertyName("xp");
b.HasKey("Id");
b.HasIndex("ReceiverAccountId");
b.HasIndex("ReceiverAccountId", "IsConsumed");
b.ToTable("received_gifts", (string)null);
});
modelBuilder.Entity("CannedNet.Models.Storefront", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("NextUpdate")
.HasColumnType("timestamp with time zone");
b.Property<int>("StorefrontType")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("storefronts", (string)null);
});
modelBuilder.Entity("CannedNet.Models.StorefrontItem", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<bool>("IsFeatured")
.HasColumnType("boolean");
b.Property<DateTime?>("NewUntil")
.HasColumnType("timestamp with time zone");
b.Property<int>("PurchasableItemId")
.HasColumnType("integer");
b.Property<int>("StorefrontId")
.HasColumnType("integer");
b.Property<int>("Type")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("StorefrontId");
b.ToTable("storefront_items", (string)null);
});
modelBuilder.Entity("CannedNet.Models.StorefrontPrice", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("CurrencyType")
.HasColumnType("integer");
b.Property<int>("Price")
.HasColumnType("integer");
b.Property<int>("StorefrontItemId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("StorefrontItemId");
b.ToTable("storefront_prices", (string)null);
});
modelBuilder.Entity("CannedNet.PlayerAvatar", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("FaceFeatures")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("FaceFeatures");
b.Property<string>("HairColor")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("HairColor");
b.Property<string>("OutfitSelections")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("OutfitSelections");
b.Property<int>("OwnerAccountId")
.HasColumnType("integer");
b.Property<string>("SkinColor")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("SkinColor");
b.HasKey("Id");
b.HasIndex("OwnerAccountId")
.IsUnique();
b.ToTable("player_avatars", (string)null);
});
modelBuilder.Entity("CannedNet.PlayerBio", b =>
{
b.Property<int>("accountId")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasJsonPropertyName("accountId");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("accountId"));
b.HasKey("accountId");
b.ToTable("player_bios", (string)null);
});
modelBuilder.Entity("CannedNet.PlayerProgression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("Level")
.HasColumnType("integer")
.HasJsonPropertyName("level");
b.Property<int>("PlayerId")
.HasColumnType("integer")
.HasJsonPropertyName("playerId");
b.Property<int>("Xp")
.HasColumnType("integer")
.HasJsonPropertyName("xp");
b.HasKey("Id");
b.HasIndex("PlayerId")
.IsUnique();
b.ToTable("player_progressions", (string)null);
});
modelBuilder.Entity("CannedNet.PlayerSetting", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Key")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("key");
b.Property<int>("PlayerId")
.HasColumnType("integer")
.HasJsonPropertyName("playerId");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("value");
b.HasKey("Id");
b.HasIndex("PlayerId", "Key")
.IsUnique();
b.ToTable("player_settings", (string)null);
});
modelBuilder.Entity("CannedNet.PromoExternalContent", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("RoomId")
.HasColumnType("integer");
b.Property<string>("Tooltip")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("tooltip");
b.Property<int>("Type")
.HasColumnType("integer")
.HasJsonPropertyName("type");
b.Property<string>("Url")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("url");
b.HasKey("Id");
b.HasIndex("RoomId");
b.ToTable("promo_external_contents", (string)null);
});
modelBuilder.Entity("CannedNet.PromoImage", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ImageUrl")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("imageUrl");
b.Property<int>("RoomId")
.HasColumnType("integer");
b.Property<int>("SortOrder")
.HasColumnType("integer")
.HasJsonPropertyName("sortOrder");
b.Property<string>("Tooltip")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("tooltip");
b.HasKey("Id");
b.HasIndex("RoomId");
b.ToTable("promo_images", (string)null);
});
modelBuilder.Entity("CannedNet.Room", b =>
{
b.Property<int>("Id")
.HasColumnType("integer");
b.Property<int>("Accessibility")
.HasColumnType("integer")
.HasJsonPropertyName("accessibility");
b.Property<bool>("CloningAllowed")
.HasColumnType("boolean")
.HasJsonPropertyName("cloningAllowed");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasJsonPropertyName("createdAt");
b.Property<int>("CreatorAccountId")
.HasColumnType("integer")
.HasJsonPropertyName("creatorAccountId");
b.Property<string>("CustomWarning")
.HasColumnType("text")
.HasJsonPropertyName("customWarning");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("description");
b.Property<bool>("DisableMicAutoMute")
.HasColumnType("boolean")
.HasJsonPropertyName("disableMicAutoMute");
b.Property<bool>("DisableRoomComments")
.HasColumnType("boolean")
.HasJsonPropertyName("disableRoomComments");
b.Property<bool>("EncryptVoiceChat")
.HasColumnType("boolean")
.HasJsonPropertyName("encryptVoiceChat");
b.Property<string>("ImageName")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("imageName");
b.Property<bool>("IsDorm")
.HasColumnType("boolean")
.HasJsonPropertyName("isDorm");
b.Property<bool>("IsRRO")
.HasColumnType("boolean")
.HasJsonPropertyName("isRRO");
b.Property<int>("MinLevel")
.HasColumnType("integer")
.HasJsonPropertyName("minLevel");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("name");
b.Property<int>("RoomId")
.HasColumnType("integer")
.HasJsonPropertyName("roomId");
b.Property<int>("State")
.HasColumnType("integer")
.HasJsonPropertyName("state");
b.Property<bool>("SupportsJuniors")
.HasColumnType("boolean")
.HasJsonPropertyName("supportsJuniors");
b.Property<bool>("SupportsLevelVoting")
.HasColumnType("boolean")
.HasJsonPropertyName("supportsLevelVoting");
b.Property<bool>("SupportsMobile")
.HasColumnType("boolean")
.HasJsonPropertyName("supportsMobile");
b.Property<bool>("SupportsQuest2")
.HasColumnType("boolean")
.HasJsonPropertyName("supportsQuest2");
b.Property<bool>("SupportsScreens")
.HasColumnType("boolean")
.HasJsonPropertyName("supportsScreens");
b.Property<bool>("SupportsTeleportVR")
.HasColumnType("boolean")
.HasJsonPropertyName("supportsTeleportVR");
b.Property<bool>("SupportsVRLow")
.HasColumnType("boolean")
.HasJsonPropertyName("supportsVRLow");
b.Property<bool>("SupportsWalkVR")
.HasColumnType("boolean")
.HasJsonPropertyName("supportsWalkVR");
b.Property<string>("Tags")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("tags");
b.Property<int>("WarningMask")
.HasColumnType("integer")
.HasJsonPropertyName("warningMask");
b.HasKey("Id");
b.HasIndex("CreatorAccountId");
b.ToTable("rooms", (string)null);
});
modelBuilder.Entity("CannedNet.RoomInstance", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<bool>("EncryptVoiceChat")
.HasColumnType("boolean")
.HasJsonPropertyName("EncryptVoiceChat");
b.Property<int>("OwnerAccountId")
.HasColumnType("integer");
b.Property<int>("clubId")
.HasColumnType("integer")
.HasJsonPropertyName("clubId");
b.Property<string>("dataBlob")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("dataBlob");
b.Property<int>("eventId")
.HasColumnType("integer")
.HasJsonPropertyName("eventId");
b.Property<bool>("isFull")
.HasColumnType("boolean")
.HasJsonPropertyName("isFull");
b.Property<bool>("isInProgress")
.HasColumnType("boolean")
.HasJsonPropertyName("isInProgress");
b.Property<bool>("isPrivate")
.HasColumnType("boolean")
.HasJsonPropertyName("isPrivate");
b.Property<string>("location")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("location");
b.Property<int>("maxCapacity")
.HasColumnType("integer")
.HasJsonPropertyName("maxCapacity");
b.Property<string>("name")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("name");
b.Property<string>("photonRegionId")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("photonRegionId");
b.Property<string>("photonRoomId")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("photonRoomId");
b.Property<string>("roomCode")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("roomCode");
b.Property<int>("roomId")
.HasColumnType("integer")
.HasJsonPropertyName("roomId");
b.Property<int>("roomInstanceId")
.HasColumnType("integer")
.HasJsonPropertyName("roomInstanceId");
b.Property<int>("roomInstanceType")
.HasColumnType("integer")
.HasJsonPropertyName("roomInstanceType");
b.Property<int>("subRoomId")
.HasColumnType("integer")
.HasJsonPropertyName("subRoomId");
b.HasKey("Id");
b.HasIndex("OwnerAccountId", "roomId");
b.ToTable("room_instances", (string)null);
});
modelBuilder.Entity("CannedNet.RoomRole", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AccountId")
.HasColumnType("integer")
.HasJsonPropertyName("accountId");
b.Property<int>("InvitedRole")
.HasColumnType("integer")
.HasJsonPropertyName("invitedRole");
b.Property<int>("Role")
.HasColumnType("integer")
.HasJsonPropertyName("role");
b.Property<int>("RoomId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("RoomId");
b.ToTable("room_roles", (string)null);
});
modelBuilder.Entity("CannedNet.SavedOutfit", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("FaceFeatures")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("FaceFeatures");
b.Property<string>("HairColor")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("HairColor");
b.Property<string>("OutfitSelections")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("OutfitSelections");
b.Property<int>("OwnerAccountId")
.HasColumnType("integer");
b.Property<string>("PreviewImageName")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("PreviewImageName");
b.Property<string>("SkinColor")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("SkinColor");
b.Property<int>("Slot")
.HasColumnType("integer")
.HasJsonPropertyName("Slot");
b.HasKey("Id");
b.HasIndex("OwnerAccountId")
.IsUnique();
b.ToTable("saved_outfits", (string)null);
});
modelBuilder.Entity("CannedNet.SubRoom", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("Accessibility")
.HasColumnType("integer")
.HasJsonPropertyName("accessibility");
b.Property<string>("DataBlob")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("dataBlob");
b.Property<DateTime?>("DataSavedAt")
.HasColumnType("timestamp with time zone")
.HasJsonPropertyName("dataSavedAt");
b.Property<bool>("IsSandbox")
.HasColumnType("boolean")
.HasJsonPropertyName("isSandbox");
b.Property<int>("MaxPlayers")
.HasColumnType("integer")
.HasJsonPropertyName("maxPlayers");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("name");
b.Property<int>("RoomId")
.HasColumnType("integer");
b.Property<int>("SubRoomId")
.HasColumnType("integer")
.HasJsonPropertyName("subRoomId");
b.Property<string>("UnitySceneId")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("unitySceneId");
b.HasKey("Id");
b.HasIndex("RoomId");
b.ToTable("sub_rooms", (string)null);
});
modelBuilder.Entity("CannedNet.TokenBalance", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("Balance")
.HasColumnType("integer")
.HasJsonPropertyName("Balance");
b.Property<int>("BalanceType")
.HasColumnType("integer")
.HasJsonPropertyName("BalanceType");
b.Property<int>("CurrencyType")
.HasColumnType("integer")
.HasJsonPropertyName("CurrencyType");
b.Property<int>("Platform")
.HasColumnType("integer")
.HasJsonPropertyName("Platform");
b.HasKey("Id");
b.ToTable("token_balances", (string)null);
});
modelBuilder.Entity("CannedNet.Models.GiftDrop", b =>
{
b.HasOne("CannedNet.Models.StorefrontItem", "StorefrontItem")
.WithMany("GiftDrops")
.HasForeignKey("StorefrontItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("StorefrontItem");
});
modelBuilder.Entity("CannedNet.Models.StorefrontItem", b =>
{
b.HasOne("CannedNet.Models.Storefront", "Storefront")
.WithMany("Items")
.HasForeignKey("StorefrontId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Storefront");
});
modelBuilder.Entity("CannedNet.Models.StorefrontPrice", b =>
{
b.HasOne("CannedNet.Models.StorefrontItem", "StorefrontItem")
.WithMany("Prices")
.HasForeignKey("StorefrontItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("StorefrontItem");
});
modelBuilder.Entity("CannedNet.Models.Storefront", b =>
{
b.Navigation("Items");
});
modelBuilder.Entity("CannedNet.Models.StorefrontItem", b =>
{
b.Navigation("GiftDrops");
b.Navigation("Prices");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,37 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CannedNet.Migrations
{
/// <inheritdoc />
public partial class MakeDataSavedAtNullable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateTime>(
name: "DataSavedAt",
table: "sub_rooms",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateTime>(
name: "DataSavedAt",
table: "sub_rooms",
type: "timestamp with time zone",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
}
}
}
+149 -143
View File
@@ -18,50 +18,50 @@ namespace CannedNet.Migrations
{ {
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "8.0.0") .HasAnnotation("ProductVersion", "10.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 63); .HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("CannedNet.Account", b => modelBuilder.Entity("CannedNet.Account", b =>
{ {
b.Property<int?>("AccountId") b.Property<int>("AccountId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "accountId"); .HasJsonPropertyName("accountId");
b.Property<DateTime>("CreatedAt") b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone") .HasColumnType("timestamp with time zone")
.HasAnnotation("Relational:JsonPropertyName", "createdAt"); .HasJsonPropertyName("createdAt");
b.Property<string>("DisplayName") b.Property<string>("DisplayName")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "displayName"); .HasJsonPropertyName("displayName");
b.Property<int?>("IdentityFlags") b.Property<int?>("IdentityFlags")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "identityFlags"); .HasJsonPropertyName("identityFlags");
b.Property<bool>("IsJunior") b.Property<bool>("IsJunior")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "isJunior"); .HasJsonPropertyName("isJunior");
b.Property<int?>("PersonalPronouns") b.Property<int?>("PersonalPronouns")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "personalPronouns"); .HasJsonPropertyName("personalPronouns");
b.Property<int?>("Platforms") b.Property<int?>("Platforms")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "platforms"); .HasJsonPropertyName("platforms");
b.Property<string>("ProfileImage") b.Property<string>("ProfileImage")
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "profileImage"); .HasJsonPropertyName("profileImage");
b.Property<string>("Username") b.Property<string>("Username")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "username"); .HasJsonPropertyName("username");
b.HasKey("AccountId"); b.HasKey("AccountId");
@@ -79,32 +79,32 @@ namespace CannedNet.Migrations
b.Property<string>("AvatarItemDesc") b.Property<string>("AvatarItemDesc")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "avatarItemDesc"); .HasJsonPropertyName("avatarItemDesc");
b.Property<int>("AvatarItemType") b.Property<int>("AvatarItemType")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "avatarItemType"); .HasJsonPropertyName("avatarItemType");
b.Property<string>("FriendlyName") b.Property<string>("FriendlyName")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "friendlyName"); .HasJsonPropertyName("friendlyName");
b.Property<int>("OwnerAccountId") b.Property<int>("OwnerAccountId")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<int>("PlatformMask") b.Property<int>("PlatformMask")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "platformMask"); .HasJsonPropertyName("platformMask");
b.Property<int>("Rarity") b.Property<int>("Rarity")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "rarity"); .HasJsonPropertyName("rarity");
b.Property<string>("Tooltip") b.Property<string>("Tooltip")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "tooltip"); .HasJsonPropertyName("tooltip");
b.HasKey("Id"); b.HasKey("Id");
@@ -123,24 +123,24 @@ namespace CannedNet.Migrations
b.Property<int>("AccountId") b.Property<int>("AccountId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "accountId"); .HasJsonPropertyName("accountId");
b.Property<DateTime>("LastLoginTime") b.Property<DateTime>("LastLoginTime")
.HasColumnType("timestamp with time zone") .HasColumnType("timestamp with time zone")
.HasAnnotation("Relational:JsonPropertyName", "lastLoginTime"); .HasJsonPropertyName("lastLoginTime");
b.Property<int>("Platform") b.Property<int>("Platform")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "platform"); .HasJsonPropertyName("platform");
b.Property<string>("PlatformID") b.Property<string>("PlatformID")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "platformId"); .HasJsonPropertyName("platformId");
b.Property<bool>("RequirePassword") b.Property<bool>("RequirePassword")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "requirePassword"); .HasJsonPropertyName("requirePassword");
b.HasKey("Id"); b.HasKey("Id");
@@ -160,11 +160,11 @@ namespace CannedNet.Migrations
b.Property<string>("ImageUrl") b.Property<string>("ImageUrl")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "imageUrl"); .HasJsonPropertyName("imageUrl");
b.Property<bool>("IsThumbnail") b.Property<bool>("IsThumbnail")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "isThumbnail"); .HasJsonPropertyName("isThumbnail");
b.Property<int>("RoomId") b.Property<int>("RoomId")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -172,7 +172,7 @@ namespace CannedNet.Migrations
b.Property<string>("Tooltip") b.Property<string>("Tooltip")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "tooltip"); .HasJsonPropertyName("tooltip");
b.HasKey("Id"); b.HasKey("Id");
@@ -191,38 +191,38 @@ namespace CannedNet.Migrations
b.Property<int>("ActiveDurationMinutes") b.Property<int>("ActiveDurationMinutes")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "ActiveDurationMinutes"); .HasJsonPropertyName("ActiveDurationMinutes");
b.Property<string>("ConsumableItemDesc") b.Property<string>("ConsumableItemDesc")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "ConsumableItemDesc"); .HasJsonPropertyName("ConsumableItemDesc");
b.Property<int>("Count") b.Property<int>("Count")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "Count"); .HasJsonPropertyName("Count");
b.Property<List<DateTime>>("CreatedAts") b.PrimitiveCollection<List<DateTime>>("CreatedAts")
.IsRequired() .IsRequired()
.HasColumnType("timestamp with time zone[]") .HasColumnType("timestamp with time zone[]")
.HasAnnotation("Relational:JsonPropertyName", "CreatedAts"); .HasJsonPropertyName("CreatedAts");
b.Property<List<int>>("Ids") b.PrimitiveCollection<List<int>>("Ids")
.IsRequired() .IsRequired()
.HasColumnType("integer[]") .HasColumnType("integer[]")
.HasAnnotation("Relational:JsonPropertyName", "Ids"); .HasJsonPropertyName("Ids");
b.Property<int>("InitialCount") b.Property<int>("InitialCount")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "InitialCount"); .HasJsonPropertyName("InitialCount");
b.Property<bool>("IsActive") b.Property<bool>("IsActive")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "IsActive"); .HasJsonPropertyName("IsActive");
b.Property<bool>("IsTransferable") b.Property<bool>("IsTransferable")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "IsTransferable"); .HasJsonPropertyName("IsTransferable");
b.Property<int>("OwnerAccountId") b.Property<int>("OwnerAccountId")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -245,28 +245,29 @@ namespace CannedNet.Migrations
b.Property<string>("AvatarItemDesc") b.Property<string>("AvatarItemDesc")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "avatarItemDesc"); .HasJsonPropertyName("avatarItemDesc");
b.Property<int>("AvatarItemType") b.Property<int>("AvatarItemType")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "avatarItemType"); .HasJsonPropertyName("avatarItemType");
b.Property<string>("ConsumableItemDesc") b.Property<string>("ConsumableItemDesc")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "consumableItemDesc"); .HasJsonPropertyName("consumableItemDesc");
b.Property<string>("FriendlyName") b.Property<string>("FriendlyName")
.IsRequired() .IsRequired()
.HasColumnType("text"); .HasColumnType("text")
.HasJsonPropertyName("friendlyName");
b.Property<int>("GiftRarity") b.Property<int>("GiftRarity")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "giftRarity"); .HasJsonPropertyName("giftRarity");
b.Property<int>("RewardContext") b.Property<int>("RewardContext")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "rewardContext"); .HasJsonPropertyName("rewardContext");
b.HasKey("Id"); b.HasKey("Id");
@@ -359,87 +360,92 @@ namespace CannedNet.Migrations
b.Property<string>("AvatarItemDesc") b.Property<string>("AvatarItemDesc")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "avatarItemDesc"); .HasJsonPropertyName("avatarItemDesc");
b.Property<int>("AvatarItemType") b.Property<int>("AvatarItemType")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "avatarItemType"); .HasJsonPropertyName("avatarItemType");
b.Property<int>("BalanceType") b.Property<int>("BalanceType")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "balanceType"); .HasJsonPropertyName("balanceType");
b.Property<string>("ConsumableItemDesc") b.Property<string>("ConsumableItemDesc")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "consumableItemDesc"); .HasJsonPropertyName("consumableItemDesc");
b.Property<DateTime?>("ConsumedAt") b.Property<DateTime?>("ConsumedAt")
.HasColumnType("timestamp with time zone") .HasColumnType("timestamp with time zone")
.HasAnnotation("Relational:JsonPropertyName", "consumedAt"); .HasJsonPropertyName("consumedAt");
b.Property<int>("Currency") b.Property<int>("Currency")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "currency"); .HasJsonPropertyName("currency");
b.Property<int>("CurrencyType") b.Property<int>("CurrencyType")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "currencyType"); .HasJsonPropertyName("currencyType");
b.Property<string>("EquipmentModificationGuid") b.Property<string>("EquipmentModificationGuid")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "equipmentModificationGuid"); .HasJsonPropertyName("equipmentModificationGuid");
b.Property<string>("EquipmentPrefabName") b.Property<string>("EquipmentPrefabName")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "equipmentPrefabName"); .HasJsonPropertyName("equipmentPrefabName");
b.Property<string>("FriendlyName")
.IsRequired()
.HasColumnType("text")
.HasJsonPropertyName("friendlyName");
b.Property<int?>("FromPlayerId") b.Property<int?>("FromPlayerId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "fromPlayerId"); .HasJsonPropertyName("fromPlayerId");
b.Property<int>("GiftContext") b.Property<int>("GiftContext")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "giftContext"); .HasJsonPropertyName("giftContext");
b.Property<int>("GiftRarity") b.Property<int>("GiftRarity")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "giftRarity"); .HasJsonPropertyName("giftRarity");
b.Property<bool>("IsConsumed") b.Property<bool>("IsConsumed")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "isConsumed"); .HasJsonPropertyName("isConsumed");
b.Property<int>("Level") b.Property<int>("Level")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "level"); .HasJsonPropertyName("level");
b.Property<string>("Message") b.Property<string>("Message")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "message"); .HasJsonPropertyName("message");
b.Property<int>("Platform") b.Property<int>("Platform")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "platform"); .HasJsonPropertyName("platform");
b.Property<int>("PlatformsToSpawnOn") b.Property<int>("PlatformsToSpawnOn")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "platformsToSpawnOn"); .HasJsonPropertyName("platformsToSpawnOn");
b.Property<DateTime>("ReceivedAt") b.Property<DateTime>("ReceivedAt")
.HasColumnType("timestamp with time zone") .HasColumnType("timestamp with time zone")
.HasAnnotation("Relational:JsonPropertyName", "receivedAt"); .HasJsonPropertyName("receivedAt");
b.Property<int>("ReceiverAccountId") b.Property<int>("ReceiverAccountId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "receiverAccountId"); .HasJsonPropertyName("receiverAccountId");
b.Property<int>("Xp") b.Property<int>("Xp")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "xp"); .HasJsonPropertyName("xp");
b.HasKey("Id"); b.HasKey("Id");
@@ -538,17 +544,17 @@ namespace CannedNet.Migrations
b.Property<string>("FaceFeatures") b.Property<string>("FaceFeatures")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "FaceFeatures"); .HasJsonPropertyName("FaceFeatures");
b.Property<string>("HairColor") b.Property<string>("HairColor")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "HairColor"); .HasJsonPropertyName("HairColor");
b.Property<string>("OutfitSelections") b.Property<string>("OutfitSelections")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "OutfitSelections"); .HasJsonPropertyName("OutfitSelections");
b.Property<int>("OwnerAccountId") b.Property<int>("OwnerAccountId")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -556,7 +562,7 @@ namespace CannedNet.Migrations
b.Property<string>("SkinColor") b.Property<string>("SkinColor")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "SkinColor"); .HasJsonPropertyName("SkinColor");
b.HasKey("Id"); b.HasKey("Id");
@@ -571,7 +577,7 @@ namespace CannedNet.Migrations
b.Property<int>("accountId") b.Property<int>("accountId")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "accountId"); .HasJsonPropertyName("accountId");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("accountId")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("accountId"));
@@ -590,15 +596,15 @@ namespace CannedNet.Migrations
b.Property<int>("Level") b.Property<int>("Level")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "level"); .HasJsonPropertyName("level");
b.Property<int>("PlayerId") b.Property<int>("PlayerId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "playerId"); .HasJsonPropertyName("playerId");
b.Property<int>("Xp") b.Property<int>("Xp")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "xp"); .HasJsonPropertyName("xp");
b.HasKey("Id"); b.HasKey("Id");
@@ -619,16 +625,16 @@ namespace CannedNet.Migrations
b.Property<string>("Key") b.Property<string>("Key")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "key"); .HasJsonPropertyName("key");
b.Property<int>("PlayerId") b.Property<int>("PlayerId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "playerId"); .HasJsonPropertyName("playerId");
b.Property<string>("Value") b.Property<string>("Value")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "value"); .HasJsonPropertyName("value");
b.HasKey("Id"); b.HasKey("Id");
@@ -652,16 +658,16 @@ namespace CannedNet.Migrations
b.Property<string>("Tooltip") b.Property<string>("Tooltip")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "tooltip"); .HasJsonPropertyName("tooltip");
b.Property<int>("Type") b.Property<int>("Type")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "type"); .HasJsonPropertyName("type");
b.Property<string>("Url") b.Property<string>("Url")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "url"); .HasJsonPropertyName("url");
b.HasKey("Id"); b.HasKey("Id");
@@ -681,19 +687,19 @@ namespace CannedNet.Migrations
b.Property<string>("ImageUrl") b.Property<string>("ImageUrl")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "imageUrl"); .HasJsonPropertyName("imageUrl");
b.Property<int>("RoomId") b.Property<int>("RoomId")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<int>("SortOrder") b.Property<int>("SortOrder")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "sortOrder"); .HasJsonPropertyName("sortOrder");
b.Property<string>("Tooltip") b.Property<string>("Tooltip")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "tooltip"); .HasJsonPropertyName("tooltip");
b.HasKey("Id"); b.HasKey("Id");
@@ -709,111 +715,111 @@ namespace CannedNet.Migrations
b.Property<int>("Accessibility") b.Property<int>("Accessibility")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "accessibility"); .HasJsonPropertyName("accessibility");
b.Property<bool>("CloningAllowed") b.Property<bool>("CloningAllowed")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "cloningAllowed"); .HasJsonPropertyName("cloningAllowed");
b.Property<DateTime>("CreatedAt") b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone") .HasColumnType("timestamp with time zone")
.HasAnnotation("Relational:JsonPropertyName", "createdAt"); .HasJsonPropertyName("createdAt");
b.Property<int>("CreatorAccountId") b.Property<int>("CreatorAccountId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "creatorAccountId"); .HasJsonPropertyName("creatorAccountId");
b.Property<string>("CustomWarning") b.Property<string>("CustomWarning")
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "customWarning"); .HasJsonPropertyName("customWarning");
b.Property<string>("Description") b.Property<string>("Description")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "description"); .HasJsonPropertyName("description");
b.Property<bool>("DisableMicAutoMute") b.Property<bool>("DisableMicAutoMute")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "disableMicAutoMute"); .HasJsonPropertyName("disableMicAutoMute");
b.Property<bool>("DisableRoomComments") b.Property<bool>("DisableRoomComments")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "disableRoomComments"); .HasJsonPropertyName("disableRoomComments");
b.Property<bool>("EncryptVoiceChat") b.Property<bool>("EncryptVoiceChat")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "encryptVoiceChat"); .HasJsonPropertyName("encryptVoiceChat");
b.Property<string>("ImageName") b.Property<string>("ImageName")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "imageName"); .HasJsonPropertyName("imageName");
b.Property<bool>("IsDorm") b.Property<bool>("IsDorm")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "isDorm"); .HasJsonPropertyName("isDorm");
b.Property<bool>("IsRRO") b.Property<bool>("IsRRO")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "isRRO"); .HasJsonPropertyName("isRRO");
b.Property<int>("MinLevel") b.Property<int>("MinLevel")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "minLevel"); .HasJsonPropertyName("minLevel");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "name"); .HasJsonPropertyName("name");
b.Property<int>("RoomId") b.Property<int>("RoomId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "roomId"); .HasJsonPropertyName("roomId");
b.Property<int>("State") b.Property<int>("State")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "state"); .HasJsonPropertyName("state");
b.Property<bool>("SupportsJuniors") b.Property<bool>("SupportsJuniors")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "supportsJuniors"); .HasJsonPropertyName("supportsJuniors");
b.Property<bool>("SupportsLevelVoting") b.Property<bool>("SupportsLevelVoting")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "supportsLevelVoting"); .HasJsonPropertyName("supportsLevelVoting");
b.Property<bool>("SupportsMobile") b.Property<bool>("SupportsMobile")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "supportsMobile"); .HasJsonPropertyName("supportsMobile");
b.Property<bool>("SupportsQuest2") b.Property<bool>("SupportsQuest2")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "supportsQuest2"); .HasJsonPropertyName("supportsQuest2");
b.Property<bool>("SupportsScreens") b.Property<bool>("SupportsScreens")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "supportsScreens"); .HasJsonPropertyName("supportsScreens");
b.Property<bool>("SupportsTeleportVR") b.Property<bool>("SupportsTeleportVR")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "supportsTeleportVR"); .HasJsonPropertyName("supportsTeleportVR");
b.Property<bool>("SupportsVRLow") b.Property<bool>("SupportsVRLow")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "supportsVRLow"); .HasJsonPropertyName("supportsVRLow");
b.Property<bool>("SupportsWalkVR") b.Property<bool>("SupportsWalkVR")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "supportsWalkVR"); .HasJsonPropertyName("supportsWalkVR");
b.Property<string>("Tags") b.Property<string>("Tags")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "tags"); .HasJsonPropertyName("tags");
b.Property<int>("WarningMask") b.Property<int>("WarningMask")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "warningMask"); .HasJsonPropertyName("warningMask");
b.HasKey("Id"); b.HasKey("Id");
@@ -832,80 +838,80 @@ namespace CannedNet.Migrations
b.Property<bool>("EncryptVoiceChat") b.Property<bool>("EncryptVoiceChat")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "EncryptVoiceChat"); .HasJsonPropertyName("EncryptVoiceChat");
b.Property<int>("OwnerAccountId") b.Property<int>("OwnerAccountId")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<int>("clubId") b.Property<int>("clubId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "clubId"); .HasJsonPropertyName("clubId");
b.Property<string>("dataBlob") b.Property<string>("dataBlob")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "dataBlob"); .HasJsonPropertyName("dataBlob");
b.Property<int>("eventId") b.Property<int>("eventId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "eventId"); .HasJsonPropertyName("eventId");
b.Property<bool>("isFull") b.Property<bool>("isFull")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "isFull"); .HasJsonPropertyName("isFull");
b.Property<bool>("isInProgress") b.Property<bool>("isInProgress")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "isInProgress"); .HasJsonPropertyName("isInProgress");
b.Property<bool>("isPrivate") b.Property<bool>("isPrivate")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "isPrivate"); .HasJsonPropertyName("isPrivate");
b.Property<string>("location") b.Property<string>("location")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "location"); .HasJsonPropertyName("location");
b.Property<int>("maxCapacity") b.Property<int>("maxCapacity")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "maxCapacity"); .HasJsonPropertyName("maxCapacity");
b.Property<string>("name") b.Property<string>("name")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "name"); .HasJsonPropertyName("name");
b.Property<string>("photonRegionId") b.Property<string>("photonRegionId")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "photonRegionId"); .HasJsonPropertyName("photonRegionId");
b.Property<string>("photonRoomId") b.Property<string>("photonRoomId")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "photonRoomId"); .HasJsonPropertyName("photonRoomId");
b.Property<string>("roomCode") b.Property<string>("roomCode")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "roomCode"); .HasJsonPropertyName("roomCode");
b.Property<int>("roomId") b.Property<int>("roomId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "roomId"); .HasJsonPropertyName("roomId");
b.Property<int>("roomInstanceId") b.Property<int>("roomInstanceId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "roomInstanceId"); .HasJsonPropertyName("roomInstanceId");
b.Property<int>("roomInstanceType") b.Property<int>("roomInstanceType")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "roomInstanceType"); .HasJsonPropertyName("roomInstanceType");
b.Property<int>("subRoomId") b.Property<int>("subRoomId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "subRoomId"); .HasJsonPropertyName("subRoomId");
b.HasKey("Id"); b.HasKey("Id");
@@ -924,15 +930,15 @@ namespace CannedNet.Migrations
b.Property<int>("AccountId") b.Property<int>("AccountId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "accountId"); .HasJsonPropertyName("accountId");
b.Property<int>("InvitedRole") b.Property<int>("InvitedRole")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "invitedRole"); .HasJsonPropertyName("invitedRole");
b.Property<int>("Role") b.Property<int>("Role")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "role"); .HasJsonPropertyName("role");
b.Property<int>("RoomId") b.Property<int>("RoomId")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -955,17 +961,17 @@ namespace CannedNet.Migrations
b.Property<string>("FaceFeatures") b.Property<string>("FaceFeatures")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "FaceFeatures"); .HasJsonPropertyName("FaceFeatures");
b.Property<string>("HairColor") b.Property<string>("HairColor")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "HairColor"); .HasJsonPropertyName("HairColor");
b.Property<string>("OutfitSelections") b.Property<string>("OutfitSelections")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "OutfitSelections"); .HasJsonPropertyName("OutfitSelections");
b.Property<int>("OwnerAccountId") b.Property<int>("OwnerAccountId")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -973,16 +979,16 @@ namespace CannedNet.Migrations
b.Property<string>("PreviewImageName") b.Property<string>("PreviewImageName")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "PreviewImageName"); .HasJsonPropertyName("PreviewImageName");
b.Property<string>("SkinColor") b.Property<string>("SkinColor")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "SkinColor"); .HasJsonPropertyName("SkinColor");
b.Property<int>("Slot") b.Property<int>("Slot")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "Slot"); .HasJsonPropertyName("Slot");
b.HasKey("Id"); b.HasKey("Id");
@@ -1002,41 +1008,41 @@ namespace CannedNet.Migrations
b.Property<int>("Accessibility") b.Property<int>("Accessibility")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "accessibility"); .HasJsonPropertyName("accessibility");
b.Property<string>("DataBlob") b.Property<string>("DataBlob")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "dataBlob"); .HasJsonPropertyName("dataBlob");
b.Property<DateTime>("DataSavedAt") b.Property<DateTime?>("DataSavedAt")
.HasColumnType("timestamp with time zone") .HasColumnType("timestamp with time zone")
.HasAnnotation("Relational:JsonPropertyName", "dataSavedAt"); .HasJsonPropertyName("dataSavedAt");
b.Property<bool>("IsSandbox") b.Property<bool>("IsSandbox")
.HasColumnType("boolean") .HasColumnType("boolean")
.HasAnnotation("Relational:JsonPropertyName", "isSandbox"); .HasJsonPropertyName("isSandbox");
b.Property<int>("MaxPlayers") b.Property<int>("MaxPlayers")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "maxPlayers"); .HasJsonPropertyName("maxPlayers");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "name"); .HasJsonPropertyName("name");
b.Property<int>("RoomId") b.Property<int>("RoomId")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<int>("SubRoomId") b.Property<int>("SubRoomId")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "subRoomId"); .HasJsonPropertyName("subRoomId");
b.Property<string>("UnitySceneId") b.Property<string>("UnitySceneId")
.IsRequired() .IsRequired()
.HasColumnType("text") .HasColumnType("text")
.HasAnnotation("Relational:JsonPropertyName", "unitySceneId"); .HasJsonPropertyName("unitySceneId");
b.HasKey("Id"); b.HasKey("Id");
@@ -1055,19 +1061,19 @@ namespace CannedNet.Migrations
b.Property<int>("Balance") b.Property<int>("Balance")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "Balance"); .HasJsonPropertyName("Balance");
b.Property<int>("BalanceType") b.Property<int>("BalanceType")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "BalanceType"); .HasJsonPropertyName("BalanceType");
b.Property<int>("CurrencyType") b.Property<int>("CurrencyType")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "CurrencyType"); .HasJsonPropertyName("CurrencyType");
b.Property<int>("Platform") b.Property<int>("Platform")
.HasColumnType("integer") .HasColumnType("integer")
.HasAnnotation("Relational:JsonPropertyName", "Platform"); .HasJsonPropertyName("Platform");
b.HasKey("Id"); b.HasKey("Id");
+1 -1
View File
@@ -86,7 +86,7 @@ public class SubRoom
[JsonPropertyName("unitySceneId")] [JsonPropertyName("unitySceneId")]
public string UnitySceneId { get; set; } = ""; public string UnitySceneId { get; set; } = "";
[JsonPropertyName("dataSavedAt")] [JsonPropertyName("dataSavedAt")]
public DateTime DataSavedAt { get; set; } public DateTime? DataSavedAt { get; set; }
} }
public class LoadScreen public class LoadScreen
+37 -30
View File
@@ -12,21 +12,22 @@ namespace CannedNet;
public static class Program public static class Program
{ {
public static async Task Main(string[] args) { public static async Task Main(string[] args)
{
WebApplicationBuilder builder = WebApplication.CreateBuilder(args); WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
//builder.Services.AddLogging(logging => { //builder.Services.AddLogging(logging => {
// logging.AddConsole(); // logging.AddConsole();
// logging.SetMinimumLevel(LogLevel.Debug); // logging.SetMinimumLevel(LogLevel.Debug);
//}); //});
string connectionString = builder.Configuration.GetConnectionString("DefaultConnection") ?? "Host=localhost;Port=5432;Database=cannednet;Username=postgres;Password=postgres"; string connectionString = builder.Configuration.GetConnectionString("DefaultConnection") ?? "Host=localhost;Port=5432;Database=cannednet;Username=postgres;Password=postgres";
builder.Services.AddControllers(); builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer(); builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(); builder.Services.AddSwaggerGen();
builder.Services.ConfigureHttpJsonOptions(options => options.SerializerOptions.PropertyNamingPolicy = null); builder.Services.ConfigureHttpJsonOptions(options => options.SerializerOptions.PropertyNamingPolicy = null);
builder.Services.AddDbContext<AppDbContext>(options => options.UseNpgsql(connectionString)); builder.Services.AddDbContext<AppDbContext>(options => options.UseNpgsql(connectionString));
builder.Services.AddSingleton<NotificationService>(); builder.Services.AddSingleton<NotificationService>();
@@ -34,8 +35,8 @@ public static class Program
builder.Services.AddScoped<JwtTokenService>(); builder.Services.AddScoped<JwtTokenService>();
builder.Services.AddSignalR(); builder.Services.AddSignalR();
builder.Services.AddAuthentication(options => builder.Services.AddAuthentication(options =>
{ {
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
}) })
@@ -48,60 +49,66 @@ public static class Program
{ {
ValidateIssuerSigningKey = true, ValidateIssuerSigningKey = true,
IssuerSigningKey = securityKey, IssuerSigningKey = securityKey,
ValidateIssuer = false, ValidateIssuer = false,
ValidIssuer = "https://lapis.codes", ValidIssuer = "https://lapis.codes",
ValidateAudience = false, ValidateAudience = false,
ValidAudiences = new[] ValidAudiences = new[]
{ {
"https://lapis.codes", "https://lapis.codes",
"https://lapis.codes/resources" "https://lapis.codes/resources"
}, },
ValidateLifetime = true, ValidateLifetime = true,
ClockSkew = TimeSpan.Zero, ClockSkew = TimeSpan.Zero,
NameClaimType = ClaimTypes.NameIdentifier, NameClaimType = ClaimTypes.NameIdentifier,
RoleClaimType = "role" RoleClaimType = "role"
}; };
}); });
builder.Services.AddAuthorization(); builder.Services.AddAuthorization();
WebApplication app = builder.Build(); WebApplication app = builder.Build();
app.MapHub<NotificationsHub>("/hub/v1"); app.MapHub<NotificationsHub>("/hub/v1");
app.UseHttpsRedirection(); app.UseHttpsRedirection();
app.UseRequestLogging(); app.UseRequestLogging();
app.UseAuthentication(); app.UseAuthentication();
app.UseAuthorization(); app.UseAuthorization();
app.MapControllers(); app.MapControllers();
IHubContext<NotificationsHub> hubContext = app.Services.GetRequiredService<IHubContext<NotificationsHub>>(); IHubContext<NotificationsHub> hubContext = app.Services.GetRequiredService<IHubContext<NotificationsHub>>();
NotificationService.SetHubContext(hubContext); NotificationService.SetHubContext(hubContext);
//if (app.Environment.IsDevelopment()) { //if (app.Environment.IsDevelopment()) {
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(options => { app.UseSwaggerUI(options =>
options.SwaggerEndpoint("/swagger/v1/swagger.json", "CannedNet v1"); {
options.RoutePrefix = "swagger/ui/"; options.SwaggerEndpoint("/swagger/v1/swagger.json", "CannedNet v1");
}); options.RoutePrefix = "swagger/ui/";
});
//} //}
using IServiceScope scope = app.Services.CreateScope(); using IServiceScope scope = app.Services.CreateScope();
AppDbContext db = scope.ServiceProvider.GetRequiredService<AppDbContext>(); AppDbContext db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
StorefrontFillService seedingService = scope.ServiceProvider.GetRequiredService<StorefrontFillService>(); StorefrontFillService seedingService = scope.ServiceProvider.GetRequiredService<StorefrontFillService>();
await seedingService.FillStorefrontsAsync(); await seedingService.FillStorefrontsAsync();
try { try
{
await db.Database.MigrateAsync(); await db.Database.MigrateAsync();
} catch { }
catch
{
await db.Database.EnsureCreatedAsync(); await db.Database.EnsureCreatedAsync();
} }
Signatures.Init();
await app.RunAsync(); await app.RunAsync();
} }
@@ -28,9 +28,11 @@ public class AuthController : ControllerBase
[HttpPost("connect/token")] [HttpPost("connect/token")]
public async Task<IResult> ConnectToken(AppDbContext db, JwtTokenService jwtService) public async Task<IResult> ConnectToken(AppDbContext db, JwtTokenService jwtService)
{ {
string grantType = "";
string accountId = ""; string accountId = "";
string platformId = ""; string platformId = "";
string platform = ""; string platform = "";
int platformInt = 0;
if (HttpContext.Request.ContentLength is > 0) if (HttpContext.Request.ContentLength is > 0)
{ {
@@ -51,12 +53,19 @@ public class AuthController : ControllerBase
switch (key) switch (key)
{ {
case "grant_type":
grantType = value;
break;
case "account_id": case "account_id":
accountId = value; accountId = value;
break; break;
case "platform_id": case "platform_id":
platformId = value; platformId = value;
break; break;
case "platform" when int.TryParse(value, out var p):
platformInt = p;
platform = ((PlatformType)p).ToString();
break;
} }
} }
} }
@@ -65,6 +74,92 @@ public class AuthController : ControllerBase
catch { } catch { }
} }
if (grantType == "create_account")
{
int newId = new Random().Next(10000, 99999);
Account account = new()
{
AccountId = newId,
ProfileImage = "DefaultProfileImage.jpg",
IsJunior = false,
Platforms = 0,
PersonalPronouns = 0,
IdentityFlags = 0,
Username = $"Player{newId}",
DisplayName = $"Player{newId}",
CreatedAt = DateTime.UtcNow
};
db.Accounts.Add(account);
if (!string.IsNullOrEmpty(platformId))
{
db.CachedLogins.Add(new CachedLogin
{
AccountId = newId,
Platform = (PlatformType)platformInt,
PlatformID = platformId,
LastLoginTime = DateTime.UtcNow,
RequirePassword = false
});
}
await db.SaveChangesAsync();
int maxRoomId = await db.Rooms.MaxAsync(r => (int?)r.RoomId) ?? 0;
int maxId = await db.Rooms.MaxAsync(r => (int?)r.Id) ?? 0;
int dormRoomId = maxRoomId + 1;
Room dormRoom = new Room
{
Id = maxId + 1,
RoomId = dormRoomId,
Name = "DormRoom",
Description = "Your personal room",
CreatorAccountId = newId,
ImageName = "",
State = 0,
Accessibility = 0,
SupportsLevelVoting = false,
IsRRO = false,
IsDorm = true,
CloningAllowed = false,
SupportsVRLow = true,
SupportsQuest2 = true,
SupportsMobile = true,
SupportsScreens = true,
SupportsWalkVR = true,
SupportsTeleportVR = true,
SupportsJuniors = true,
MinLevel = 0,
WarningMask = 0,
CustomWarning = null,
DisableMicAutoMute = false,
DisableRoomComments = false,
EncryptVoiceChat = false,
CreatedAt = DateTime.UtcNow,
Tags = "[]"
};
db.Rooms.Add(dormRoom);
SubRoom dormSubRoom = new SubRoom
{
RoomId = dormRoomId,
SubRoomId = 1,
Name = "DormRoom",
DataBlob = "",
IsSandbox = false,
MaxPlayers = 4,
Accessibility = 0,
UnitySceneId = "76d98498-60a1-430c-ab76-b54a29b7a163",
DataSavedAt = DateTime.UtcNow
};
db.SubRooms.Add(dormSubRoom);
await db.SaveChangesAsync();
accountId = newId.ToString();
}
string accessToken = jwtService.GenerateToken(accountId, platformId, platform); string accessToken = jwtService.GenerateToken(accountId, platformId, platform);
if (!string.IsNullOrEmpty(accountId) && int.TryParse(accountId, out var id)) if (!string.IsNullOrEmpty(accountId) && int.TryParse(accountId, out var id))
@@ -8,7 +8,8 @@ namespace CannedNet.Services.Controllers;
public class CDNController public class CDNController
{ {
[HttpGet("config/LoadingScreenTipData")] [HttpGet("config/LoadingScreenTipData")]
public Task<IResult> GetLoadingScreenTipData() { public Task<IResult> GetLoadingScreenTipData()
{
var json = File.ReadAllText("JSON/loadingscreentipdata.json"); var json = File.ReadAllText("JSON/loadingscreentipdata.json");
return Task.FromResult(Results.Content(json, "application/json")); return Task.FromResult(Results.Content(json, "application/json"));
} }
@@ -29,6 +30,22 @@ public class CDNController
} }
} }
[HttpGet("room/{dataBlob}")]
public async Task<IResult> GetRoom(string dataBlob)
{
var filePath = Path.Combine("Data", "DataBlobs", dataBlob);
if (File.Exists(filePath))
{
var sigBytes = await File.ReadAllBytesAsync(filePath);
return Results.File(sigBytes, "application/octet-stream");
}
else
{
return Results.NotFound();
}
}
[HttpPost("upload")] [HttpPost("upload")]
[Authorize] [Authorize]
public async Task<IResult> Upload(IFormFile file) public async Task<IResult> Upload(IFormFile file)
@@ -42,7 +59,7 @@ public class CDNController
var imageId = Guid.NewGuid().ToString("N"); var imageId = Guid.NewGuid().ToString("N");
var extension = Path.GetExtension(file.FileName).ToLowerInvariant(); var extension = Path.GetExtension(file.FileName).ToLowerInvariant();
var validExtensions = new[] { ".png", ".jpg", ".jpeg" }; var validExtensions = new[] { ".png", ".jpg", ".jpeg" };
if (string.IsNullOrEmpty(extension) || !validExtensions.Contains(extension)) if (string.IsNullOrEmpty(extension) || !validExtensions.Contains(extension))
{ {
@@ -72,4 +89,4 @@ public class CDNController
return Results.Problem($"Error uploading image: {ex.Message}"); return Results.Problem($"Error uploading image: {ex.Message}");
} }
} }
} }
@@ -1,16 +1,16 @@
using CannedNet.Services.Infrastructure; using CannedNet.Services.Infrastructure;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SixLabors.ImageSharp; using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Jpeg;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing; using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Formats.Png;
namespace CannedNet.Services.Controllers; namespace CannedNet.Services.Controllers;
[ApiController, Route("img")] [ApiController, Route("img")]
public class ImageController : ControllerBase public class ImageController : ControllerBase
{ {
private static readonly byte[] PlaceholderJpeg; private static readonly byte[] PlaceholderPng;
static ImageController() static ImageController()
{ {
@@ -18,90 +18,98 @@ public class ImageController : ControllerBase
using Image<Rgba32> image = new(64, 64); using Image<Rgba32> image = new(64, 64);
image.Mutate(x => x.BackgroundColor(Color.FromRgb(32, 32, 32))); image.Mutate(x => x.BackgroundColor(Color.FromRgb(32, 32, 32)));
using MemoryStream ms = new(); using MemoryStream ms = new();
image.SaveAsJpeg(ms, new JpegEncoder { Quality = 50 }); image.SaveAsPng(ms);
PlaceholderJpeg = ms.ToArray(); PlaceholderPng = ms.ToArray();
} }
[HttpGet("{imageName}")] [HttpGet("{imageName}")]
public async Task<IResult> GetImage(string imageName) public async Task<IResult> GetImage(string imageName)
{ {
HttpContext context = HttpContext; var context = HttpContext;
string imagesDir = Path.Combine("Images"); string imagesDir = Path.Combine("Images");
Directory.CreateDirectory(imagesDir); Directory.CreateDirectory(imagesDir);
string filePath = Path.Combine(imagesDir, imageName); string filePath = Path.Combine(imagesDir, imageName);
byte[] imageBytes; byte[] imageBytes;
string contentType; bool fromFile = false;
if (System.IO.File.Exists(filePath)) if (System.IO.File.Exists(filePath))
{ {
imageBytes = await System.IO.File.ReadAllBytesAsync(filePath); imageBytes = await System.IO.File.ReadAllBytesAsync(filePath);
string ext = Path.GetExtension(imageName).ToLowerInvariant(); fromFile = true;
contentType = ext switch
{
".jpg" or ".jpeg" => "image/jpeg",
".gif" => "image/gif",
".webp" => "image/webp",
".bmp" => "image/bmp",
_ => "image/png"
};
} }
else else
{ {
imageBytes = PlaceholderJpeg; // IMPORTANT: placeholder is ONLY fallback, not treated as real asset
contentType = "image/jpeg"; imageBytes = PlaceholderPng;
} }
string? cropSquare = context.Request.Query["cropSquare"].FirstOrDefault(); string? cropSquare = context.Request.Query["cropSquare"].FirstOrDefault();
string? widthStr = context.Request.Query["width"].FirstOrDefault(); string? widthStr = context.Request.Query["width"].FirstOrDefault();
string? heightStr = context.Request.Query["height"].FirstOrDefault(); string? heightStr = context.Request.Query["height"].FirstOrDefault();
if (string.IsNullOrEmpty(widthStr) && string.IsNullOrEmpty(heightStr) && string.IsNullOrEmpty(cropSquare)) bool hasTransform =
!string.IsNullOrEmpty(widthStr) ||
!string.IsNullOrEmpty(heightStr) ||
(!string.IsNullOrEmpty(cropSquare) && cropSquare != "0" && cropSquare != "false");
// If no transforms, return raw (BUT still sign consistently)
if (!hasTransform)
{ {
SignImageResponse(context, ref imageBytes); context.Response.Headers["content-signature"] =
return Results.File(imageBytes, contentType); "key-id=KEY:RSA:p1.rec.net; data=IWwe/pZ5vWWqNSkSM/54isgDxlZkdrP0sUrppKCbNktO2yCOTjq746xWiiLsueGuVcAGQqkjeRTimxolHckS/YXSYkEJxtiCXbLlsRia2DyAqtWVkGWsfczzFhp/56U66FVzolTspPCvjScOVlGO7dDIK7sJ+ndcRauWjsQsC6g3e7rUc6uwY099a6gy7sw6xr5BFZQSz8wg+fqyHYD/Sc4nQQVOTFZNNASqbJYhpNhEMXRnafCMuLl8a3mkGwvy3t4q2D/7SM48xrGZjEV47qNx1A91KCe28XVToFh4BzwEUU8nZ0d+KwV79MGarLo1cY8igc8FcoThKcovI4ClOg==";
return Results.File(imageBytes, "image/png");
} }
using Image image = Image.Load(imageBytes); using Image image = Image.Load(imageBytes);
int resizeWidth = 0; // Crop square
int resizeHeight = 0;
if (!string.IsNullOrEmpty(cropSquare) && cropSquare != "0" && cropSquare != "false") if (!string.IsNullOrEmpty(cropSquare) && cropSquare != "0" && cropSquare != "false")
{ {
int size = Math.Min(image.Width, image.Height); int size = Math.Min(image.Width, image.Height);
int x = (image.Width - size) / 2; int x = (image.Width - size) / 2;
int y = (image.Height - size) / 2; int y = (image.Height - size) / 2;
image.Mutate(img => img.Crop(new Rectangle(x, y, size, size))); image.Mutate(img => img.Crop(new Rectangle(x, y, size, size)));
} }
if (int.TryParse(widthStr, out int w)) int.TryParse(widthStr, out int width);
resizeWidth = w; int.TryParse(heightStr, out int height);
if (int.TryParse(heightStr, out int h)) if (width > 0 || height > 0)
resizeHeight = h;
if (resizeWidth > 0 || resizeHeight > 0)
{ {
image.Mutate(x => x.Resize(resizeWidth, resizeHeight)); image.Mutate(img => img.Resize(width, height));
} }
// ALWAYS output PNG for deterministic bytes (critical for signatures)
using MemoryStream output = new(); using MemoryStream output = new();
await image.SaveAsJpegAsync(output, new JpegEncoder { Quality = 85 }); await image.SaveAsPngAsync(output);
imageBytes = output.ToArray(); imageBytes = output.ToArray();
SignImageResponse(context, ref imageBytes);
return Results.File(imageBytes, "image/jpeg"); // IMPORTANT: signature must match final bytes EXACTLY
context.Response.Headers["content-signature"] =
"key-id=KEY:RSA:p1.rec.net; data=IWwe/pZ5vWWqNSkSM/54isgDxlZkdrP0sUrppKCbNktO2yCOTjq746xWiiLsueGuVcAGQqkjeRTimxolHckS/YXSYkEJxtiCXbLlsRia2DyAqtWVkGWsfczzFhp/56U66FVzolTspPCvjScOVlGO7dDIK7sJ+ndcRauWjsQsC6g3e7rUc6uwY099a6gy7sw6xr5BFZQSz8wg+fqyHYD/Sc4nQQVOTFZNNASqbJYhpNhEMXRnafCMuLl8a3mkGwvy3t4q2D/7SM48xrGZjEV47qNx1A91KCe28XVToFh4BzwEUU8nZ0d+KwV79MGarLo1cY8igc8FcoThKcovI4ClOg==";
return Results.File(imageBytes, "image/png");
} }
private static void SignImageResponse(HttpContext context, ref byte[] imageBytes) private static void SignImageResponse(HttpContext context, ref byte[] imageBytes)
{ {
if (context.Request.Query["sig"] != "p1") return; if (context.Request.Query["sig"] != "p1")
return;
string? signature = Signatures.Sign(imageBytes); string? signature = Signatures.Sign(imageBytes);
if (signature != null) if (signature != null)
{ {
context.Response.Headers["Content-Signature"] = $"key-id=KEY:RSA:p1.rec.net; data={signature}"; // Keep EXACT format expected by client
context.Response.Headers["content-signature"] =
"key-id=KEY:RSA:p1.rec.net; data=" + signature;
} }
} }
} }
@@ -10,57 +10,16 @@ public class PlayerSettingsController : ControllerBase
{ {
[HttpGet("playersettings")] [HttpGet("playersettings")]
[Authorize] [Authorize]
public async Task<IResult> GetPlayerSettings(AppDbContext db) public async Task<ActionResult> GetPlayerSettings(AppDbContext db)
{ {
if (!int.TryParse(User.Identity?.Name, out var id)) if (!int.TryParse(User.Identity?.Name, out var id))
return Results.Unauthorized(); return Unauthorized();
var settings = await db.PlayerSettings var settings = await db.PlayerSettings
.Where(s => s.PlayerId == id) .Where(s => s.PlayerId == id)
.ToListAsync(); .ToListAsync();
if (!settings.Any()) return Ok(settings);
{
var defaults = new List<PlayerSetting>
{
new() { PlayerId = id, Key = "Recroom.OOBE", Value = "77" },
new() { PlayerId = id, Key = "SplitTestAssignedSegments", Value = "1|{\"SplitTesting+PhotonMaxDatagrams_2021_01_11\":\"Off\",\"SplitTesting+Curated_Rooms_2020_08_06\":\"Off\",\"SplitTesting+RoomRecommendationsType_2020_08_14\":\"Aug14MinVisitors35000\"}" },
new() { PlayerId = id, Key = "PlayerSessionCount", Value = "13" },
new() { PlayerId = id, Key = "TUTORIAL_COMPLETE_MASK", Value = "11" },
new() { PlayerId = id, Key = "BACKPACK_FAVORITE_TOOL", Value = "1" },
new() { PlayerId = id, Key = "VoiceChat", Value = "2" },
new() { PlayerId = id, Key = "VRAUTOSPRINT", Value = "1" },
new() { PlayerId = id, Key = "VR_MOVEMENT_MODE", Value = "0" },
new() { PlayerId = id, Key = "COMFORT_SPRINT", Value = "0" },
new() { PlayerId = id, Key = "COMFORT_WALK", Value = "0" },
new() { PlayerId = id, Key = "COMFORT_VEHICLES", Value = "0" },
new() { PlayerId = id, Key = "COMFORT_FLY", Value = "0" },
new() { PlayerId = id, Key = "COMFORT_ROTATE", Value = "0" },
new() { PlayerId = id, Key = "COMFORT_FORCES", Value = "0" },
new() { PlayerId = id, Key = "COMFORT_FALL", Value = "0" },
new() { PlayerId = id, Key = "COMFORT_TELEPORT", Value = "0" },
new() { PlayerId = id, Key = "ROTATE_IN_PLACE_ENABLED", Value = "1" },
new() { PlayerId = id, Key = "ROTATION_INCREMENT", Value = "2" },
new() { PlayerId = id, Key = "CONTINUOUS_ROTATION_MODE", Value = "1" },
new() { PlayerId = id, Key = "DONT_LOCK_TOOLS_TO_HAND", Value = "0" },
new() { PlayerId = id, Key = "QualitySettings", Value = "2" },
new() { PlayerId = id, Key = "TeleportBuffer", Value = "0" },
new() { PlayerId = id, Key = "IgnoreBuffer", Value = "1" },
new() { PlayerId = id, Key = "FIRST_TIME_IN_FLAGS", Value = "0" },
new() { PlayerId = id, Key = "ShowRoomCenter", Value = "1" },
new() { PlayerId = id, Key = "USER_TRACKING", Value = "1" },
new() { PlayerId = id, Key = "STABILIZE_HANDS", Value = "0" },
new() { PlayerId = id, Key = "MakerPen_SnappingMode", Value = "2" },
new() { PlayerId = id, Key = "Recroom.ChallengeMap", Value = "17" },
new() { PlayerId = id, Key = "VoiceFilter2", Value = "1" },
new() { PlayerId = id, Key = "SFX_VOLUME_PERCENT_PREF", Value = "1" },
};
db.PlayerSettings.AddRange(defaults);
await db.SaveChangesAsync();
settings = defaults;
}
return Results.Json(settings);
} }
[HttpPut("playersettings")] [HttpPut("playersettings")]
+14 -5
View File
@@ -20,10 +20,19 @@ public static class Signatures
{ {
Console.WriteLine("sigs - creating new sig key"); Console.WriteLine("sigs - creating new sig key");
Directory.CreateDirectory("Data"); Directory.CreateDirectory("Data");
using var newKey = RSA.Create(2048); using var newKey = RSA.Create(2048);
var pem = newKey.ExportPkcs8PrivateKeyPem();
File.WriteAllText(pemPath, pem); var privatePem = newKey.ExportPkcs8PrivateKeyPem();
Console.WriteLine("sigs - key saved to " + pemPath); File.WriteAllText(pemPath, privatePem);
var publicPem = newKey.ExportSubjectPublicKeyInfoPem();
File.WriteAllText(
Path.Combine("Data", "PublicKey.pem"),
publicPem
);
Console.WriteLine("sigs - keys saved");
} }
var pemContent = File.ReadAllText(pemPath); var pemContent = File.ReadAllText(pemPath);
@@ -36,7 +45,7 @@ public static class Signatures
Console.WriteLine($"sigs - failed to load key: {ex.Message}"); Console.WriteLine($"sigs - failed to load key: {ex.Message}");
} }
} }
public static RSA? GetRsaInstance() public static RSA? GetRsaInstance()
{ {
if (!_initialized) Init(); if (!_initialized) Init();
@@ -49,4 +58,4 @@ public static class Signatures
var signatureBytes = _rsa.SignData(data, HashAlgorithmName.SHA1, RSASignaturePadding.Pkcs1); var signatureBytes = _rsa.SignData(data, HashAlgorithmName.SHA1, RSASignaturePadding.Pkcs1);
return Convert.ToBase64String(signatureBytes); return Convert.ToBase64String(signatureBytes);
} }
} }