Add remaining project files
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user