mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 11:51:18 +00:00
34 lines
941 B
C#
34 lines
941 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Spacebar.Interop.Replication.Abstractions;
|
|
|
|
public class ContentlessReplicationMessage {
|
|
[JsonPropertyName("channel_id")]
|
|
public string? ChannelId { get; set; }
|
|
|
|
[JsonPropertyName("guild_id")]
|
|
public string? GuildId { get; set; }
|
|
|
|
[JsonPropertyName("user_id")]
|
|
public string? UserId { get; set; }
|
|
|
|
[JsonPropertyName("session_id")]
|
|
public string? SessionId { get; set; }
|
|
|
|
[JsonPropertyName("created_at")]
|
|
public DateTime? CreatedAt { get; set; }
|
|
|
|
[JsonPropertyName("event")]
|
|
public string Event { get; set; } = null!;
|
|
|
|
[JsonPropertyName("origin")]
|
|
public string? Origin { get; set; }
|
|
|
|
[JsonPropertyName("reconnect_delay")]
|
|
public int? ReconnectDelay { get; set; }
|
|
}
|
|
|
|
public class ReplicationMessage<TPayload> : ContentlessReplicationMessage {
|
|
[JsonPropertyName("data")]
|
|
public TPayload Payload { get; set; } = default!;
|
|
} |