submodule对gitea不管用,所以直接拉了一份拉格兰

This commit is contained in:
2025-02-04 16:29:43 +08:00
parent b0bfc803e3
commit d149a2ea0f
1023 changed files with 43308 additions and 18 deletions

View File

@@ -0,0 +1,11 @@
using System.Text.Json.Serialization;
namespace Lagrange.OneBot.Core.Entity.Meta;
[Serializable]
public class OneBotHeartBeat(uint selfId, int interval, object status) : OneBotMeta(selfId, "heartbeat")
{
[JsonPropertyName("interval")] public int Interval { get; set; } = interval;
[JsonPropertyName("status")] public object Status { get; set; } = status;
}

View File

@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Lagrange.OneBot.Core.Entity.Meta;
[Serializable]
public class OneBotLifecycle(uint selfId, string subType) : OneBotMeta(selfId, "lifecycle")
{
[JsonPropertyName("sub_type")] public string SubType { get; set; } = subType;
}

View File

@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Lagrange.OneBot.Core.Entity.Meta;
[Serializable]
public abstract class OneBotMeta(uint selfId, string metaEventType) : OneBotEntityBase(selfId, "meta_event")
{
[JsonPropertyName("meta_event_type")] public string MetaEventType { get; set; } = metaEventType;
}

View File

@@ -0,0 +1,17 @@
using System.Text.Json.Serialization;
namespace Lagrange.OneBot.Core.Entity.Meta;
[Serializable]
public class OneBotStatus(bool online, bool good)
{
[JsonPropertyName("app_initialized")] public bool AppInitialized { get; set; } = true;
[JsonPropertyName("app_enabled")] public bool AppEnabled { get; set; } = true;
[JsonPropertyName("app_good")] public bool AppGood { get; set; } = true;
[JsonPropertyName("online")] public bool Online { get; set; } = online;
[JsonPropertyName("good")] public bool Good { get; set; } = good;
}