using EggLink.DanhengServer.Enums.Scene; using EggLink.DanhengServer.Proto; using Google.Protobuf; using SqlSugar; namespace EggLink.DanhengServer.Database.Scene; [SugarTable("Scene")] public class SceneData : BaseDatabaseDataHelper { [SugarColumn(IsJson = true)] public Dictionary>> ScenePropData { get; set; } = []; // Dictionary> [SugarColumn(IsJson = true)] public Dictionary> UnlockSectionIdList { get; set; } = []; // Dictionary> [SugarColumn(IsJson = true)] public Dictionary> CustomSaveData { get; set; } = []; // Dictionary> [SugarColumn(IsJson = true)] public Dictionary> FloorSavedData { get; set; } = []; // Dictionary> [SugarColumn(IsJson = true)] public Dictionary>> PropTimelineData { get; set; } = []; // Dictionary> } public class ScenePropData { public int PropId { get; set; } public PropStateEnum State { get; set; } } public class ScenePropTimelineData { public uint UintValue { get; set; } public bool BoolValue { get; set; } public string ByteValue { get; set; } = ""; // Base64 public PropTimelineInfo ToProto() { return new PropTimelineInfo { TimelineIntValue = UintValue, TimelineBoolValue = BoolValue, TimelineByteValue = ByteString.FromBase64(ByteValue) }; } }