Add remaining project files

This commit is contained in:
Marco Baldwin
2026-07-23 18:21:43 -07:00
parent c12d8ac35d
commit 6e15e89a9d
453 changed files with 64265 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
using LiteDB;
using System.Xml.Linq;
using static DeluxeBackend.Enums;
namespace DeluxeBackend.Models
{
public class SubRoomSave
{
[BsonId]
public long Id { get; set; }
public required long SubRoomId { get; set; }
public required string DataBlob { get; set; }
public long? SavedByAccountId { get; set; } = null;
public PlatformType? SavedOnPlatform { get; set; } = null;
public DeviceClassType? SavedOnDeviceClass { get; set; } = null;
public string? Description { get; set; } = null;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public string? UnityAssetId { get; set; } = null;
public int PersistenceVersion { get; set; } = 0;
//UnityAssetId
[BsonIgnore]
public Dictionary<string, object> ToDictionary()
{
#pragma warning disable CS8601 // Possible null reference assignment.
Dictionary<string, object> data = new()
{
["SubRoomDataSaveId"] = Id,
["SubRoomId"] = SubRoomId,
["DataBlob"] = DataBlob,
["OMVersion"] = 0,
["PersistenceVersion"] = PersistenceVersion,
["SavedByAccountId"] = SavedByAccountId,
["SavedOnPlatform"] = SavedOnPlatform,
["SavedOnDeviceClass"] = SavedOnDeviceClass,
["Description"] = Description,
["CreatedAt"] = CreatedAt.ToString("O"),
["UnityAssetId"] = UnityAssetId
};
return data;
#pragma warning restore CS8601
}
}
}